updated on Sun Jan 15 04:04:02 UTC 2012
[aur-mirror.git] / lapsus-svn / lapsus.rc_script
blob6f092871a4f73ca7f5b759377b53da974bb94b82
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PID=`pidof -o %PPID /usr/sbin/lapsusd`
8 case "$1" in
9 start)
10 stat_busy "Starting lapsusd"
11 [ -z "$PID" ] && /usr/sbin/lapsusd
12 if [ $? -gt 0 ]; then
13 stat_fail
14 else
15 add_daemon lapsusd
16 stat_done
19 stop)
20 stat_busy "Stopping lapsusd"
21 [ ! -z "$PID" ] && kill $PID &> /dev/null
22 if [ $? -gt 0 ]; then
23 stat_fail
24 else
25 rm_daemon lapsusd
26 stat_done
29 restart)
30 $0 stop
31 $0 start
34 echo "usage: $0 {start|stop|restart}"
35 esac
36 exit 0