diff --git a/etc/initsystem/icinga2.sysconfig.cmake b/etc/initsystem/icinga2.sysconfig.cmake index 646347d19..e7fa54baf 100644 --- a/etc/initsystem/icinga2.sysconfig.cmake +++ b/etc/initsystem/icinga2.sysconfig.cmake @@ -6,6 +6,7 @@ ICINGA2_PID_FILE=$ICINGA2_RUN_DIR/icinga2/icinga2.pid ICINGA2_ERROR_LOG=@CMAKE_INSTALL_FULL_LOCALSTATEDIR@/log/icinga2/error.log ICINGA2_STARTUP_LOG=@CMAKE_INSTALL_FULL_LOCALSTATEDIR@/log/icinga2/startup.log ICINGA2_LOG=@CMAKE_INSTALL_FULL_LOCALSTATEDIR@/log/icinga2/icinga2.log +ICINGA2_CACHE_DIR=$ICINGA2_STATE_DIR/cache/icinga2 ICINGA2_USER=@ICINGA2_USER@ ICINGA2_GROUP=@ICINGA2_GROUP@ ICINGA2_COMMAND_GROUP=@ICINGA2_COMMAND_GROUP@ diff --git a/etc/initsystem/prepare-dirs b/etc/initsystem/prepare-dirs index 6c4a08869..cb6ddbec0 100644 --- a/etc/initsystem/prepare-dirs +++ b/etc/initsystem/prepare-dirs @@ -51,3 +51,7 @@ if type restorecon >/dev/null 2>&1; then restorecon -R $ICINGA2_RUN_DIR/icinga2/ fi chmod 2750 $ICINGA2_RUN_DIR/icinga2/cmd + +mkdir -p $ICINGA2_CACHE_DIR +chown $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_CACHE_DIR +chmod 750 $ICINGA2_CACHE_DIR