2004-10-15 19:57:02 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# An rc.subr-style startup script for Courier-IMAP's POP3 over SSL service.
|
|
|
|
|
2005-01-08 11:25:05 +01:00
|
|
|
# PROVIDE: courier_imap_pop3d_ssl
|
|
|
|
# REQUIRE: LOGIN courier_authdaemond
|
2006-02-20 21:47:50 +01:00
|
|
|
# KEYWORD: shutdown
|
2004-10-15 19:57:02 +02:00
|
|
|
|
2005-01-08 11:25:05 +01:00
|
|
|
# Define these courier_imap_pop3d_ssl_* variables in one of these files:
|
2004-10-15 19:57:02 +02:00
|
|
|
# /etc/rc.conf
|
|
|
|
# /etc/rc.conf.local
|
2005-01-08 11:25:05 +01:00
|
|
|
# /etc/rc.conf.d/courier_imap_pop3d_ssl
|
2004-10-15 19:57:02 +02:00
|
|
|
#
|
|
|
|
# DO NOT CHANGE THESE DEFAULT VALUES HERE
|
|
|
|
|
2005-01-08 11:25:05 +01:00
|
|
|
courier_imap_pop3d_ssl_enable=${courier_imap_pop3d_ssl_enable-"NO"}
|
2004-10-15 19:57:02 +02:00
|
|
|
|
2010-03-27 01:15:24 +01:00
|
|
|
. /etc/rc.subr
|
2004-10-15 19:57:02 +02:00
|
|
|
|
2005-01-08 11:25:05 +01:00
|
|
|
name="courier_imap_pop3d_ssl"
|
2012-01-14 09:57:23 +01:00
|
|
|
rcvar=courier_imap_pop3d_ssl_enable
|
2004-10-15 19:57:02 +02:00
|
|
|
command="%%PREFIX%%/libexec/courier-imap/pop3d-ssl.rc"
|
2005-01-08 11:25:05 +01:00
|
|
|
pidfile="/var/run/pop3d-ssl.pid"
|
2006-09-28 16:53:15 +02:00
|
|
|
procname="%%PREFIX%%/sbin/courierlogger"
|
2004-10-15 19:57:02 +02:00
|
|
|
|
2005-01-08 11:25:05 +01:00
|
|
|
start_cmd="pop3d_ssl_cmd start"
|
|
|
|
stop_cmd="pop3d_ssl_cmd stop"
|
|
|
|
restart_cmd="pop3d_ssl_cmd stop && pop3d_ssl_cmd start"
|
2004-10-15 19:57:02 +02:00
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
|
2005-01-08 11:25:05 +01:00
|
|
|
pop3d_ssl_cmd () {
|
2004-10-15 19:57:02 +02:00
|
|
|
case $1 in
|
|
|
|
start)
|
|
|
|
echo "Starting ${name}."
|
|
|
|
${command} start
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
echo "Stopping ${name}."
|
|
|
|
${command} stop
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
run_rc_command "$1"
|
|
|
|
|