updated on Thu Jan 19 00:16:31 UTC 2012
[aur-mirror.git] / miniircd-git / miniircd.rc
blobf264f8f6bc5dbacad2301bfd2e82271488b9fe12
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 DAEMON=miniircd
8 [ -r /etc/conf.d/$DAEMON ] && . /etc/conf.d/$DAEMON
10 PID=$(get_pid python2 $DAEMON)
12 case "$1" in
13 start)
14 stat_busy "Starting $DAEMON"
15 [ -z "$PID" ] && $DAEMON $ARGS &>/dev/null
16 if [ $? = 0 ]; then
17 add_daemon $DAEMON
18 stat_done
19 else
20 stat_fail
21 exit 1
24 stop)
25 stat_busy "Stopping $DAEMON"
26 [ -n "$PID" ] && kill $PID &>/dev/null
27 if [ $? = 0 ]; then
28 rm_daemon $DAEMON
29 stat_done
30 else
31 stat_fail
32 exit 1
35 restart)
36 $0 stop
37 sleep 1
38 $0 start
41 echo "usage: $0 {start|stop|restart}"
42 esac