Created attachment 391728 [details] New init script for icinga 2 With the new initscript introduced, part of the existing functionalities were lost. I've attached a new init script with the following modifications: - Calls to checkpath to replace the missing icinga2-prepare-dirs (required to create /run/icinga2 and /var/cache/icinga2) - Call to icinga2 daemon in '-C' mode, which checks the configuration (but was missing in the current runscript) - extra_commands="checkconfig" - Start failure on configuration failure - Use start-stop-daemon for starting the daemon - Use the standard status command, no need to recreate one There are still some issues: - "checkpath -d -m 2750" does not seem to work: "/run/icinga2/cmd: correcting mode" on every start - It would be great to have a dependency on postgres/mysql depending on the useflags: any idea how to do so? - Is "need net" required? (Warning: I'm not runscript expert, so there might be errors in there)
Created attachment 391744 [details] New init script for icinga 2 As prometheanfire noticed on IRC, I missed that ICINGA2_USER is not defined anymore in the conf file (I was using a staled version). This new version uses $DAEMON variable get --current RunAsUser/RunAsGroup to get the running user/group first (and doesn't try anymore to compare it to a non existant value in the conf filr)
thanks for working on this, fixed in tree as r2 I think the 2750 issue is a common one. Don't think we should depend on pgsql/mysql (maybe a use postgresql/mysql would work). You may be connecting to a remote pgsql server (as I am). Also, for pgsql, the initscripts are based on version installed, so it'd be postgresql-server-9.3 or something. I think need net is still required though, this is in 'net-analyzer' for a reason.