[omd-commits] OMD Git: omd: Finally fixed Debuntu Startskript multiple start/stop issue

git version control git at mathias-kettner.de
Wed Oct 16 03:08:53 CEST 2013


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

Author:   Mathias Kettner <mk at mathias-kettner.de>
Date:     Wed Oct 16 03:08:24 2013 +0200
Commiter: Mathias Kettner <mk at mathias-kettner.de>
Date:     Wed Oct 16 03:08:24 2013 +0200

Finally fixed Debuntu Startskript multiple start/stop issue

---

 Changelog      |    2 ++
 debian/init.in |   20 +++++---------------
 2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/Changelog b/Changelog
index f7a9d84..3cc9295 100644
--- a/Changelog
+++ b/Changelog
@@ -15,6 +15,8 @@ This file documents the revision history for the Open Monitoring Distribution
           - Nagios: Init script kills whole process groups during "stop"
           - check_webinject: Update to 1.80
           - gearmand: increase open files limit
+          - Fix bug on Debian/Ubuntu where start/stop script started/stopped
+             sites multiple times
 
 1.00     Jun 17 2013
           - Nagios: Update to 3.5.0
diff --git a/debian/init.in b/debian/init.in
index 8b2f2aa..060aae1 100755
--- a/debian/init.in
+++ b/debian/init.in
@@ -14,23 +14,13 @@
 
 # -- start omd, if not disabled in /etc/default/omd
 AUTOSTART=1
-
-PROGNAME=$0
-PROGNAME=${PROGNAME##*/}
-VERSION=${PROGNAME#omd-}
-
-if [ "$VERSION" = "###OMD_VERSION###" ]; then
-  VER="-V $VERSION"
-  MSG=" using omd version $VERSION"
-else 
-  VER=""
-  MSG=""
-fi
-
-OMD="/opt/omd/versions/###OMD_VERSION###/bin/omd"
-
 [ -r /etc/default/omd ] && . /etc/default/omd
 
+VERSION=###OMD_VERSION###
+VER="-V $VERSION"
+MSG="using omd version $VERSION"
+OMD="/omd/versions/$VERSION/bin/omd"
+
 case "$1" in
     start)
 	if [ "$AUTOSTART" = "1" ]; then



More information about the omd-commits mailing list