diff options
author | root <root@rshg054.dnsready.net> | 2011-11-23 23:15:26 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-11-23 23:15:26 +0000 |
commit | 1e1e4927b05d9b242bfe83794e3a98ab2c8f79ef (patch) | |
tree | 070846cb6770ab17d394d88c3f0cd3ad3eb89842 /community-staging/courier-mta/courier.rc.d | |
parent | 851ab9aa99e9bda38f88b5f5ade096c9137e11c8 (diff) |
Wed Nov 23 23:15:26 UTC 2011
Diffstat (limited to 'community-staging/courier-mta/courier.rc.d')
-rw-r--r-- | community-staging/courier-mta/courier.rc.d | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/community-staging/courier-mta/courier.rc.d b/community-staging/courier-mta/courier.rc.d new file mode 100644 index 000000000..7c581a24a --- /dev/null +++ b/community-staging/courier-mta/courier.rc.d @@ -0,0 +1,45 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + + [ -d /var/run/courier ] || mkdir -p /var/run/courier + chown courier:courier /var/run/courier + + if ck_daemon authdaemond; then + echo "ERROR: authdaemond is not running" + stat_fail + exit 1 + fi + + stat_busy "Starting Courier daemon" + /usr/sbin/courier start + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon courier + stat_done + fi + ;; + stop) + stat_busy "Stopping Courier daemon" + /usr/sbin/courier stop > /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon courier + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 |