From 1fcb176285908c33aca3b0f5cb703ec098e5440c Mon Sep 17 00:00:00 2001 From: root Date: Thu, 16 Jun 2011 22:59:30 +0000 Subject: Thu Jun 16 22:59:30 UTC 2011 --- community/courier-mta/pop3d-ssl.rc.d | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 community/courier-mta/pop3d-ssl.rc.d (limited to 'community/courier-mta/pop3d-ssl.rc.d') diff --git a/community/courier-mta/pop3d-ssl.rc.d b/community/courier-mta/pop3d-ssl.rc.d new file mode 100644 index 000000000..730c6edbf --- /dev/null +++ b/community/courier-mta/pop3d-ssl.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 [ ! -f /var/run/daemons/authdaemond ]; then + echo "ERROR: authdaemond is not running" + stat_fail + exit 1 + fi + + stat_busy "Starting Courier pop3d-ssl" + /usr/sbin/pop3d-ssl start + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon pop3d-ssl + stat_done + fi + ;; + stop) + stat_busy "Stopping Courier pop3d-ssl" + /usr/sbin/pop3d-ssl stop > /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon pop3d-ssl + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 -- cgit v1.2.3-54-g00ecf