updated on Thu Jan 19 00:16:31 UTC 2012
[aur-mirror.git] / mailgraph / mailgraph
blob261468f2e7230203ca20af4d0ccf765f5dbd7f89
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
5 . /etc/conf.d/mailgraph
7 case "$1" in
8 start)
9 stat_busy "Starting Mailgraph"
10 nice -19 $MAILGRAPH_PL -l $MAIL_LOG -d --daemon-pid=$PID_FILE \
11 --daemon-rrd=$RRD_DIR
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 add_daemon mailgraph
17 stat_done
20 stop)
21 stat_busy "Stopping Mailgraph"
22 kill `cat $PID_FILE`
23 if [ $? -gt 0 ]; then
24 stat_fail
25 else
26 rm $PID_FILE
27 rm_daemon mailgraph
28 stat_done
31 restart)
32 $0 stop
33 sleep 1
34 $0 start
37 echo "usage: $0 {start|stop|restart}"
38 esac
39 exit 0