There are multiple problems with the existing init script currently shipped for icinga2: 1. The existing script starts with these defines at the top: ICINGA2_CONFIG_FILE="/etc/icinga2/icinga2.conf" ICINGA2_RUN_DIR="/run/icinga2" ICINGA2_STATE_DIR="/var/cache/icinga2" ICINGA2_CMD_DIR="${ICINGA2_RUN_DIR}/cmd" ICINGA2_PID_FILE="${ICINGA2_RUN_DIR}/icinga2/icinga2.pid" ICINGA2_DAEMON_ARGS="daemon -c $ICINGA2_CONFIG_FILE -e $ICINGA2_ERROR_LOG -d" There is an error with the ICINGA2_PID_FILE define. This expands to ICINGA2_PID_FILE misdefined as '/run/icinga2/icinga2/icinga2.pid - which is invalid. This define is used in all of the init script sections - start, stop and status. Fixing this define fixes the issue whereby /etc/init.d/icinga2 stop doesn't work at all (ie the stop command is completely broken right now). 2. With the above error corrected, the output of '/etc/init.d/icinga2 status' is: tornado files # /etc/init.d/icinga2 status [ ok ] tornado files # The correct output for this command is: tornado files # /etc/init.d/icinga2 status * status: started tornado files # Simply removing the entire "status()" section of the init file seems to fix this bug also, as the status command then works as expected, and produces the right output. 3. The init script shipped with icinga2 supports a 'configcheck' option. We should support this in the Gentoo version too. The upstream initscript looks like this: https://github.com/Icinga/icinga2/blob/master/etc/initsystem/icinga2.init.d.cmake Perhaps something from their version can be re-used in our version.
thanks for pointing those out :D fixed