updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / pagekite / pagekite.rc.d
blob286db47b93b0b5572ce1833c2e6c2b05ed114d29
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 DAEMON=pagekite.py
7 PID=$(pidof -x $DAEMON)
9 case "$1" in
10 start)
11 stat_busy "Starting $DAEMON"
12 if [ -z "$PID" ] && $DAEMON --optfile /etc/pagekite.conf; then
13 add_daemon pagekite
14 stat_done
15 else
16 stat_fail
17 exit 1
20 stop)
21 stat_busy "Stopping $DAEMON"
22 if [ -n "$PID" ] && kill $PID; then
23 rm_daemon pagekite
24 stat_done
25 else
26 stat_fail
27 exit 1
30 restart)
31 $0 stop
32 $0 start
35 echo "usage: $0 {start|stop|restart}"
36 esac