updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / unscd / rc.d
blobab62752fb38084d70e9a7de721bf10b5daf8158b
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
5 . /etc/conf.d/unscd
7 BIN=/usr/sbin/unscd
8 PID=$(pidof -o %PPID $BIN)
10 case "$1" in
11 start)
12 stat_busy "Starting unscd"
13 [[ -z "$PID" ]] && $BIN $UNSCD_OPTIONS
14 if (( $? == 0 )); then
15 add_daemon unscd
16 stat_done
17 else
18 stat_fail
21 stop)
22 stat_busy "Stopping unscd"
23 [[ ! -z "$PID" ]] && kill $PID &> /dev/null
24 if (( $? == 0 )); then
25 rm_daemon unscd
26 stat_done
27 else
28 stat_fail
31 restart)
32 $0 stop
33 sleep 1
34 $0 start
37 echo "usage: $0 {start|stop|restart}"
38 esac
40 # vim:set ts=2 sw=2 ft=sh noet: