[omd-commits] OMD Git: omd: Nagios: Init script kills whole process groups during "stop"
git version control
git at mathias-kettner.de
Wed Aug 21 15:16:01 CEST 2013
Module: omd
Branch: master
Commit: 8bc0cc4d850a723925552bc7b1aa0f35b0151e18
URL: http://omdistro.org/projects/omd/repository/revisions/8bc0cc4d850a723925552bc7b1aa0f35b0151e18
Author: Lars Michelsen <lm at mathias-kettner.de>
Date: Wed Aug 21 15:15:51 2013 +0200
Commiter: Lars Michelsen <lm at mathias-kettner.de>
Date: Wed Aug 21 15:15:51 2013 +0200
Nagios: Init script kills whole process groups during "stop"
---
Changelog | 1 +
packages/nagios/skel/etc/init.d/nagios | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Changelog b/Changelog
index 8737db4..33908f1 100644
--- a/Changelog
+++ b/Changelog
@@ -11,6 +11,7 @@ This file documents the revision history for the Open Monitoring Distribution
editing the cron config etc/cron.d/diskspace
- Thruk: Update to 1.74
- Mod-Gearman: Update 1.4.10
+ - Nagios: Init script kills whole process groups during "stop"
1.00 Jun 17 2013
- Nagios: Update to 3.5.0
diff --git a/packages/nagios/skel/etc/init.d/nagios b/packages/nagios/skel/etc/init.d/nagios
index e6bb6c7..363e17b 100755
--- a/packages/nagios/skel/etc/init.d/nagios
+++ b/packages/nagios/skel/etc/init.d/nagios
@@ -124,8 +124,10 @@ nagios_wait_stop() {
# multiple times to fetch new processes until all are gone.
I=0
while kill -0 $pid >/dev/null 2>&1; do
- # Send single kill per process
- kill $pid
+ # Send TERM to process group to kill the nagios process and also
+ # other processes started by this nagios process, for example
+ # check plugins which are currently running
+ kill -TERM -$pid
while kill -0 $pid >/dev/null 2>&1; do
if [ $I = '60' ]; then
echo -ne "\nsending SIGKILL"
More information about the omd-commits
mailing list