[omd-commits] OMD Git: omd: Reworked last nagios init script patch

git version control git at mathias-kettner.de
Wed Apr 3 09:52:40 CEST 2013


Module:   omd
Branch:   master
Commit:   f14bd4af86be388452547c2be52ef1e742f6dc35
URL:      http://omdistro.org/projects/omd/repository/revisions/f14bd4af86be388452547c2be52ef1e742f6dc35

Author:   Lars Michelsen <lm at mathias-kettner.de>
Date:     Wed Apr  3 09:52:35 2013 +0200
Commiter: Lars Michelsen <lm at mathias-kettner.de>
Date:     Wed Apr  3 09:52:35 2013 +0200

Reworked last nagios init script patch

---

 packages/nagios/skel/etc/init.d/nagios |   22 +++++++---------------
 1 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/packages/nagios/skel/etc/init.d/nagios b/packages/nagios/skel/etc/init.d/nagios
index 3ad4952..e6bb6c7 100755
--- a/packages/nagios/skel/etc/init.d/nagios
+++ b/packages/nagios/skel/etc/init.d/nagios
@@ -128,23 +128,15 @@ nagios_wait_stop() {
         kill $pid
         while kill -0 $pid  >/dev/null 2>&1;  do
             if [ $I = '60' ]; then
-                echo " Nagios still running.. sending SIGKILL"
+                echo -ne "\nsending SIGKILL"
                 kill -9 $pid
-                I=0
-                while kill -0 $pid  >/dev/null 2>&1;  do
-                    if [ $I = '10' ]; then
-                        return 1
-                    else
-                        echo -n "."
-                        I=$(($I+1))
-                        sleep 1
-                    fi
-                done
-            else
-                echo -n "."
-                I=$(($I+1))
-                sleep 1
+            elif [ $I = '70' ]; then
+                return 1 
             fi
+                
+            echo -n "."
+            I=$(($I+1))
+            sleep 1
         done
         # Is there another proc with ppid 1?
         pid=$(pidof_nagios) || break



More information about the omd-commits mailing list