updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / ntlmaps / ntlmaps
blob7b29ef2efd30e438968fd86965ead4abfed17676
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PID=`pidof -o %PPID /usr/bin/python /usr/bin/ntlmaps`
7 case "$1" in
8 start)
9 stat_busy "Starting ntlmaps"
10 if [ -z "$PID" ]; then
11 /usr/bin/ntlmaps > /var/log/ntlmaps.log 2>&1 &
13 if [ ! -z "$PID" -o $? -gt 0 ]; then
14 stat_fail
15 else
16 add_daemon ntlmaps
17 stat_done
20 stop)
21 stat_busy "Stopping ntlmaps"
22 [ ! -z "$PID" ] && kill $PID &> /dev/null
23 if [ $? -gt 0 ]; then
24 stat_fail
25 else
26 rm_daemon ntlmaps
27 stat_done
30 restart)
31 $0 stop
32 sleep 1
33 $0 start
36 echo "usage: $0 {start|stop|restart}"
37 esac