The new /etc/init.d/icinga2 is broken. It will no longer start/stop the daemon. Reproducible: Always Steps to Reproduce: 1. rc-service icinga2 restart Actual Results: spidey ~ # rc-service icinga2 restart * Caching service dependencies ... [ ok ] * Stopping icinga2 ... [ ok ] * Starting icinga2 ... * Error starting icinga2. '/var/log/icinga2/startup.log' for details. [ !! ] * ERROR: icinga2 failed to start spidey ~ # cat /var/log/icinga2/startup.log [2014-12-11 11:54:39 -0800] critical/icinga-app: Error while parsing command-line options: unrecognised option '-c' spidey ~ # Expected Results: spidey ~ # rc-service icinga2 restart * Stopping icinga2 ... [ ok ] * Starting icinga2 ... [ ok ] spidey ~ # The command line to /usr/sbin/icinga2 has changed recently. I can restart the daemon if I change this: to this: ICINGA2_DAEMON_ARGS=" -c $ICINGA2_CONFIG_FILE \ -e $ICINGA2_ERROR_LOG \ -u $ICINGA2_USER \ -g $ICINGA2_GROUP \ -d " ICINGA2_DAEMON_ARGS=" daemon -c $ICINGA2_CONFIG_FILE \ -e $ICINGA2_ERROR_LOG \ -d " I know that is an incomplete solution, but icinga2 no longer seems to take user or group on the commmand line.
Digging a bit further, I see icinga2 now takes the user:group to run as from the file /etc/icinga2/init.conf: spidey ~ # cat init.conf /** * This file is read by Icinga 2 before the main * configuration file (icinga2.conf) is processed. */ const RunAsUser = "icinga" const RunAsGroup = "icingacmd" spidey ~ # So at least the daemon is not running as root. But these two lines in /etc/conf.d/icinga2 do nothing: ICINGA2_USER=icinga ICINGA2_GROUP=icingacmd I tried this: ICINGA2_DAEMON_ARGS=" daemon \ -c $ICINGA2_CONFIG_FILE \ -e $ICINGA2_ERROR_LOG \ -D RunAsUser=$ICINGA2_USER \ -D RunAsGroup=$ICINGA2_GROUP \ -d " But I get the error: std::exception::what: Tried to modify read-only script variable 'RunAsUser' So there may be no way to get $ICINGA2_USER and $ICINGA2_GROUP to run from the command line.
There is an error in the init script: The genoo-init script tries to start icinga2 without the daemon option. Compare to the orogonal init script of icinga: $DAEMON daemon -c $ICINGA2_CONFIG_FILE -d -e $ICINGA2_ERROR_LOG
Fixed in tree, but will require a remerge.
(In reply to Matthew Thode ( prometheanfire ) from comment #3) > Fixed in tree, but will require a remerge. Thank you! It works!