/etc/init.d/nagios3 status returns 0 if nagios isn't running
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nagios3 (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
The init.d script says status OK even when the Nagios daemon is not running.
$ sudo /etc/init.d/nagios3 status
* checking /usr/sbin/
$ sudo pgrep nagios
(no output)
It's because the script is passing 0 to the log function rather than 1.
$ diff -u nagios3.old nagios3
--- nagios3.old 2009-04-27 11:04:18.000000000 +1000
+++ nagios3 2009-04-27 11:04:25.000000000 +1000
@@ -180,7 +180,7 @@
exit 1
else
- log_action_end_msg 0 "not running"
+ log_action_end_msg 1 "not running"
exit 3
fi
fi
Now it does what I think it should:
$ sudo /etc/init.d/nagios3 status
* checking /usr/sbin/
(spaces between ... and [] were omitted for brevity)
$ dpkg -l nagios3
ii nagios3 3.0.2-1ubuntu1.1 A host/service/
Ubuntu 8.04 with latest updates.
Changed in nagios3 (Ubuntu): | |
assignee: | ttx → nobody |
You mean Ubuntu 8.10, right ? There is no nagios3 package in 8.04.