]> granicus.if.org Git - icinga2/commitdiff
Ensure the cache directory exists 5392/head
authorEwoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
Sat, 1 Jul 2017 11:59:58 +0000 (13:59 +0200)
committerEwoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
Sat, 1 Jul 2017 11:59:58 +0000 (13:59 +0200)
As suggested in https://github.com/Icinga/icinga2/issues/4414

etc/initsystem/icinga2.sysconfig.cmake
etc/initsystem/prepare-dirs

index 646347d19c72d88d046cd28fbc66100deb6c48b4..e7fa54bafbf0f64550764e10c728de88d072c046 100644 (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@
index 6c4a088692c514dc9b66522395a6e41f73ae90eb..cb6ddbec0f8f8fa36cbacad80bf68bc942531584 100644 (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