updated on Thu Jan 19 00:16:31 UTC 2012
[aur-mirror.git] / sams2-svn / samsd.archlinux
blob6c58924213dbae8921ef3f74bb1a541936ac13af
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 EXE=/usr/bin/sams2daemon
7 LOCKFILE=/var/lock/samsd
8 RETVAL=0
10 PID=`pidof -o %PPID $EXE`
12 case "$1" in
13 start)
14 stat_busy "Starting SAMS Daemon"
15 [ -z "$PID" ] && $EXE
16 if [ $? -gt 0 ]; then
17 stat_fail
18 else
19 add_daemon samsd
20 stat_done
23 stop)
24 stat_busy "Stopping SAMS Daemon"
25 [ ! -z "$PID" ] && kill $PID &> /dev/null
26 if [ $? -gt 0 ]; then
27 stat_fail
28 else
29 rm_daemon samsd
30 stat_done
33 restart)
34 $0 stop
35 sleep 1
36 $0 start
39 echo "usage: $0 {start|stop|restart}"
40 esac
41 exit 0