summaryrefslogtreecommitdiff
path: root/package/unscd/S46unscd
blob: 6a51eec1301e80e396f85f7014cf0c553113ceb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

NAME="nscd"
DAEMON="/usr/sbin/${NAME}"
PID_F="/var/run/nscd/${NAME}.pid"

case "$1" in
start)
        printf "Starting ${NAME}: "
        start-stop-daemon -S -p ${PID_F} -x ${DAEMON}
        [ $? -eq 0 ] && echo "OK" || echo "FAIL"
        ;;
stop)
        printf "Stopping ${NAME}: "
        start-stop-daemon -K -p ${PID_F}
        [ $? -eq 0 ] && echo "OK" || echo "FAIL"
        ;;
restart|reload)
        $0 stop
        $0 start
        ;;
*)
        echo "Usage: $0 {start|stop|restart|reload}"
        exit 1
esac