diff --git a/traffic_router/tomcat-rpm/tomcat.spec b/traffic_router/tomcat-rpm/tomcat.spec index 6ab96d215b..1a0662f694 100644 --- a/traffic_router/tomcat-rpm/tomcat.spec +++ b/traffic_router/tomcat-rpm/tomcat.spec @@ -23,6 +23,7 @@ Source: %{_sourcedir}/apache-tomcat-%{version}.tar.gz Requires: java-11-openjdk-headless %define tomcat_home /opt/tomcat +%define TOMCAT_LOG_DIR /var/log/tomcat %description This rpm is a minimal install of the Tomcat servlet container version 9.0. @@ -74,6 +75,9 @@ fi %{tomcat_home} %post +if [ ! -d %{TOMCAT_LOG_DIR} ]; then + %__mkdir -p %{TOMCAT_LOG_DIR} +fi %preun