Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
[dev.icinga.com #4243] init script status exit codes on not running daemon and present pid file #1292
This issue has been migrated from Redmine: https://dev.icinga.com/issues/4243
Created by adrianlzt on 2013-06-04 14:07:38 +00:00
If the pid file (/var/run/icinga.pid) is present, but icinga is not running, running status in the init.d gives the correct message (icinga is not running), but the return code is 0, when it must be 3.
A patch is attached.
2013-06-29 16:28:21 +00:00 by (unknown) 45915d9
2013-07-01 21:02:50 +00:00 by (unknown) b22c934
Updated by mfriedrich on 2013-06-29 16:20:08 +00:00
the issue is two-folded when calling the 'status' option on the init script
in order to solve the issue, rename printstatus() function to checkstatus() to illustrate the need of exit calls, and further, add a check function simply looking if pid file exists (if not, exit 3) and if, decide wether icinga pid is running, or pidfile is invalid and daemon dead (exit 1).
Updated by mfriedrich on 2013-06-29 16:25:47 +00:00