Merge pull request #5392 from ekohl/cache-dir

Ensure the cache directory exists
This commit is contained in:
Michael Friedrich 2017-08-09 18:22:07 +02:00 committed by GitHub
commit e188686ed4
2 changed files with 5 additions and 0 deletions

View File

@ -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@

View File

@ -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