SOURCES: cr.init - update pidfile with proper pid
glen
glen at pld-linux.org
Mon Mar 17 07:22:12 CET 2008
Author: glen Date: Mon Mar 17 06:22:12 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- update pidfile with proper pid
---- Files affected:
SOURCES:
cr.init (1.2 -> 1.3)
---- Diffs:
================================================================
Index: SOURCES/cr.init
diff -u SOURCES/cr.init:1.2 SOURCES/cr.init:1.3
--- SOURCES/cr.init:1.2 Mon Mar 17 07:01:40 2008
+++ SOURCES/cr.init Mon Mar 17 07:22:07 2008
@@ -35,15 +35,18 @@
msg_starting "Conference Room IRC Daemon"; busy
start-stop-daemon --start \
--chdir /var/lib/cr \
- --pidfile /var/lib/cr/CRServices.pid \
--exec /usr/lib/cr/programs/launcher \
--chuid ircd \
-- /var/lib/cr $SERVICES
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
+ # write proper pidfile as it itself probably writes parent pid which is no longer there
+ pidfile=/var/lib/cr/CRServices.pid
+ pid=$(ps -o pid= -C ConfRoom | head -n1)
+ [ "$pid" ] && echo "$pid" > $pidfile
ok
- touch /var/lock/subsys/cr
+ touch /var/lock/subsys/cr
else
fail
fi
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/cr.init?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list