[ps-watcher] 34/88: generate pidfile in some ugly way and drop use of killall

Jan Wagner waja at alioth.debian.org
Fri Nov 8 23:06:36 UTC 2013


This is an automated email from the git hooks/post-receive script.

waja pushed a commit to branch master
in repository ps-watcher.

commit 5360efdfa73628bd7aaf6878e41c798a36516c9c
Author: Jan Wagner <waja at cyconet.org>
Date:   Wed Jul 4 19:28:02 2007 +0000

    generate pidfile in some ugly way and drop use of killall
---
 debian/init.d |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/debian/init.d b/debian/init.d
index d3a3d2c..7f8da5f 100644
--- a/debian/init.d
+++ b/debian/init.d
@@ -61,22 +61,23 @@ case "$1" in
 	echo -n "Starting $DESC: "
 	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
 		--exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS
+	ps aux | grep $DAEMON | head -1 | awk '{ print $2 }' > /var/run/$NAME.pid
 	echo "$NAME."
 	;;
   stop)
 	echo -n "Stopping $DESC: "
 	#start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
 	#	--exec $DAEMON
-	killall -9 $NAME
 	echo "$NAME."
 	;;
   restart|force-reload)
 	echo -n "Restarting $DESC: "
-	start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ 
+	start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
 		--exec $DAEMON
 	sleep 1
 	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
 		 --exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS
+	ps aux | grep $DAEMON | head -1 | awk '{ print $2 }' > /var/run/$NAME.pid
 	echo "$NAME."
 	;;
   *)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/ps-watcher.git



More information about the Pkg-perl-cvs-commits mailing list