updated on Fri Jan 20 12:03:34 UTC 2012
[aur-mirror.git] / dbmail3 / dbmail.rc.d
blob92c34e5d248395395f5be3c563481a15de355b27
1 #!/bin/bash
3 [ -f /etc/conf.d/dbmail ] && . /etc/conf.d/dbmail
5 . /etc/rc.conf
6 . /etc/rc.d/functions
8 case "$1" in
9 start)
10 for daemon in $DBMAIL_DAEMONS; do
11 stat_busy "Starting DbMail ${daemon}"
12 /usr/sbin/${daemon}
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 stat_done
18 done
19 add_daemon dbmail
21 stop)
22 for daemon in $DBMAIL_DAEMONS; do
23 stat_busy "Stopping DbMail ${daemon}"
24 pid=$(cat /var/run/${daemon}.pid)
25 kill $pid
26 sleep 4
27 stat_done
28 done
29 rm_daemon dbmail
31 restart)
32 $0 stop
33 sleep 3
34 $0 start
37 echo "usage: $0 {start|stop|restart}"
39 esac
41 exit 0