[Pkg-nagios-changes] [pkg-nagios] r1822 - ndoutils/trunk/debian
Hendrik Frenzel
hfrenzel-guest at alioth.debian.org
Wed Feb 17 10:29:19 UTC 2010
tags 545435 pending
tags 560681 pending
thanks
Author: hfrenzel-guest
Date: 2010-02-17 10:29:18 +0000 (Wed, 17 Feb 2010)
New Revision: 1822
Modified:
ndoutils/trunk/debian/changelog
ndoutils/trunk/debian/ndoutils-NG-DB.ndoutils.init.in
ndoutils/trunk/debian/ndoutils-NG-DB.postinst.in
Log:
* added check for existance of the socket on (re)start
* added --debconf-ok in postinst
Modified: ndoutils/trunk/debian/changelog
===================================================================
--- ndoutils/trunk/debian/changelog 2010-01-23 23:10:47 UTC (rev 1821)
+++ ndoutils/trunk/debian/changelog 2010-02-17 10:29:18 UTC (rev 1822)
@@ -1,3 +1,10 @@
+ndoutils (1.4b7-12) unstable; urgency=low
+
+ * Removes socket on (re)start if ndoutils isn't running (Closes: 560681)
+ * Enabled ucf --debconf-ok in postinst script (Closes: 545435)
+
+ -- Hendrik Frenzel <hfrenzel at scunc.net> Mon, 08 Feb 2010 16:57:20 +0100
+
ndoutils (1.4b7-11) unstable; urgency=low
* dropped empty ndoutils-nagios2-mysql binary package
Modified: ndoutils/trunk/debian/ndoutils-NG-DB.ndoutils.init.in
===================================================================
--- ndoutils/trunk/debian/ndoutils-NG-DB.ndoutils.init.in 2010-01-23 23:10:47 UTC (rev 1821)
+++ ndoutils/trunk/debian/ndoutils-NG-DB.ndoutils.init.in 2010-02-17 10:29:18 UTC (rev 1822)
@@ -16,6 +16,7 @@
DAEMON=/usr/sbin/ndo2db
NAME=ndoutils
DESC=ndoutils
+SOCKET="/var/cache/nagios3/ndo.sock"
test -x $DAEMON || exit 0
@@ -30,8 +31,16 @@
start)
echo -n "Starting $DESC: "
test ! "$ENABLE_NDOUTILS" = 1 && { echo "Not enabled in /etc/default/ndoutils"; exit 0; }
+ if pgrep -u nagios -f "$DAEMON $DAEMON_OPTS"; then
+ echo "Socket exists. $NAME is already running."
+ exit 0
+ else
+ rm -f $SOCKET
+ fi
+
start-stop-daemon --start --quiet --user nagios --group nagios --exec $DAEMON --background -- $DAEMON_OPTS
echo "$NAME."
+
;;
stop)
echo -n "Stopping $DESC: "
@@ -66,6 +75,13 @@
sleep 1
echo "$NAME."
test ! "$ENABLE_NDOUTILS" = 1 && { echo "Not enabled in /etc/defaults/ndoutils"; exit 0; }
+ if `pgrep -u nagios -f "$DAEMON $DAEMON_OPTS"`; then
+ echo "Socket still exists. $NAME is already running."
+ exit 1
+ else
+ rm -f $SOCKET
+ fi
+
start-stop-daemon --start --quiet --exec $DAEMON --background -- $DAEMON_OPTS
echo "$NAME."
;;
Modified: ndoutils/trunk/debian/ndoutils-NG-DB.postinst.in
===================================================================
--- ndoutils/trunk/debian/ndoutils-NG-DB.postinst.in 2010-01-23 23:10:47 UTC (rev 1821)
+++ ndoutils/trunk/debian/ndoutils-NG-DB.postinst.in 2010-02-17 10:29:18 UTC (rev 1822)
@@ -28,7 +28,7 @@
case "$1" in
configure)
- ucf /usr/share/@@PACKAGE@@/tmpl/ndomod.cfg /etc/@@NG@@/ndomod.cfg
+ ucf --debconf-ok /usr/share/@@PACKAGE@@/tmpl/ndomod.cfg /etc/@@NG@@/ndomod.cfg
;;
abort-upgrade|abort-remove|abort-deconfigure)
More information about the Pkg-nagios-changes
mailing list