# Start Icinga 2
start() {
printf "Starting Icinga 2: "
- @CMAKE_INSTALL_PREFIX@/lib/icinga2/prepare-dirs
+ @CMAKE_INSTALL_PREFIX@/lib/icinga2/prepare-dirs "$SYSCONFIGFILE"
if ! $DAEMON daemon -c $ICINGA2_CONFIG_FILE -d -e $ICINGA2_ERROR_LOG > $ICINGA2_STARTUP_LOG 2>&1; then
echo "Error starting Icinga. Check '$ICINGA2_STARTUP_LOG' for details."
# Reload Icinga 2
reload() {
- exec @CMAKE_INSTALL_PREFIX@/lib/icinga2/safe-reload $SYSCONFIGFILE
+ exec @CMAKE_INSTALL_PREFIX@/lib/icinga2/safe-reload "$SYSCONFIGFILE"
}
# Check the Icinga 2 configuration
# This script prepares directories and files needed for running Icinga2
#
+# With sysvinit we need to pass the environment this way. Or do we?
+if [ "$1" != "" ]; then
+ source "$1"
+fi
+
# Set defaults, to overwrite see "@ICINGA2_SYSCONFIGFILE@"
: ${ICINGA2_USER:="@ICINGA2_USER@"}
#!/bin/sh
+# With sysvinit we need to pass the environment this way. Or do we?
+if [ "$1" != "" ]; then
+ source "$1"
+fi
+
+# Set defaults, to overwrite see "@ICINGA2_SYSCONFIGFILE@"
+
: ${ICINGA2_PID_FILE:="@ICINGA2_RUNDIR@/icinga2/icinga2.pid"}
: ${DAEMON:="@CMAKE_INSTALL_FULL_SBINDIR@/icinga2"}