2015-12-02 15:56:17 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
NAME="nscd"
|
|
|
|
DAEMON="/usr/sbin/${NAME}"
|
2015-12-23 14:54:40 +01:00
|
|
|
PID_F="/var/run/nscd/${NAME}.pid"
|
2015-12-02 15:56:17 +01:00
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
printf "Starting ${NAME}: "
|
2015-12-23 14:54:40 +01:00
|
|
|
start-stop-daemon -S -p ${PID_F} -x ${DAEMON}
|
2015-12-02 15:56:17 +01:00
|
|
|
[ $? -eq 0 ] && echo "OK" || echo "FAIL"
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
printf "Stopping ${NAME}: "
|
2015-12-23 14:54:40 +01:00
|
|
|
start-stop-daemon -K -p ${PID_F}
|
2015-12-02 15:56:17 +01:00
|
|
|
[ $? -eq 0 ] && echo "OK" || echo "FAIL"
|
|
|
|
;;
|
|
|
|
restart|reload)
|
|
|
|
$0 stop
|
|
|
|
$0 start
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|restart|reload}"
|
|
|
|
exit 1
|
|
|
|
esac
|