diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/dbmail/dbmail.rc.d |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/dbmail/dbmail.rc.d')
-rw-r--r-- | community/dbmail/dbmail.rc.d | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/community/dbmail/dbmail.rc.d b/community/dbmail/dbmail.rc.d new file mode 100644 index 000000000..92c34e5d2 --- /dev/null +++ b/community/dbmail/dbmail.rc.d @@ -0,0 +1,41 @@ +#!/bin/bash + +[ -f /etc/conf.d/dbmail ] && . /etc/conf.d/dbmail + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + for daemon in $DBMAIL_DAEMONS; do + stat_busy "Starting DbMail ${daemon}" + /usr/sbin/${daemon} + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + fi + done + add_daemon dbmail + ;; + stop) + for daemon in $DBMAIL_DAEMONS; do + stat_busy "Stopping DbMail ${daemon}" + pid=$(cat /var/run/${daemon}.pid) + kill $pid + sleep 4 + stat_done + done + rm_daemon dbmail + ;; + restart) + $0 stop + sleep 3 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" + ;; +esac + +exit 0 |