package/unscd: add PID file to init script
authorDoug Kehn <rdkehn@yahoo.com>
Wed, 23 Dec 2015 13:54:40 +0000 (07:54 -0600)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 23 Dec 2015 16:45:08 +0000 (17:45 +0100)
unscd creates/manages it's own PID file. Pass PID file reference to
start-stop-daemon.

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Doug Kehn <rdkehn@yahoo.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/unscd/S46unscd

index 7d18f947c835b3cb6d79396d9b1e945d318c07e5..6a51eec1301e80e396f85f7014cf0c553113ceb6 100644 (file)
@@ -2,16 +2,17 @@
 
 NAME="nscd"
 DAEMON="/usr/sbin/${NAME}"
+PID_F="/var/run/nscd/${NAME}.pid"
 
 case "$1" in
 start)
         printf "Starting ${NAME}: "
-        start-stop-daemon -S -x ${DAEMON}
+        start-stop-daemon -S -p ${PID_F} -x ${DAEMON}
         [ $? -eq 0 ] && echo "OK" || echo "FAIL"
         ;;
 stop)
         printf "Stopping ${NAME}: "
-        start-stop-daemon -K -x ${DAEMON}
+        start-stop-daemon -K -p ${PID_F}
         [ $? -eq 0 ] && echo "OK" || echo "FAIL"
         ;;
 restart|reload)