Commit ccf8ecd1 authored by Doug Kehn's avatar Doug Kehn Committed by Thomas Petazzoni
Browse files

package/unscd: add PID file to init script



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: default avatarDoug Kehn <rdkehn@yahoo.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 0afd3409
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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)