mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-30 10:38:37 +00:00
83eb2c3700
literal name_enable wherever possible, and ${name}_enable when it's not, to prepare for the demise of set_rcvar(). In cases where I had to hand-edit unusual instances also modify formatting slightly to be more uniform (and in some cases, correct). This includes adding some $FreeBSD$ tags, and most importantly moving rcvar= to right after name= so it's clear that one is derived from the other.
47 lines
977 B
Bash
47 lines
977 B
Bash
#!/bin/sh
|
|
#
|
|
# An rc.subr-style startup script for Courier-IMAP's IMAP over SSL service.
|
|
|
|
# PROVIDE: courier_imap_imapd_ssl
|
|
# REQUIRE: LOGIN courier_authdaemond
|
|
# KEYWORD: shutdown
|
|
|
|
# Define these courier_imap_imapd_ssl_* variables in one of these files:
|
|
# /etc/rc.conf
|
|
# /etc/rc.conf.local
|
|
# /etc/rc.conf.d/courier_imap_imapd_ssl
|
|
#
|
|
# DO NOT CHANGE THESE DEFAULT VALUES HERE
|
|
|
|
courier_imap_imapd_ssl_enable=${courier_imap_imapd_ssl_enable-"NO"}
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="courier_imap_imapd_ssl"
|
|
rcvar=courier_imap_imapd_ssl_enable
|
|
command="%%PREFIX%%/libexec/courier-imap/imapd-ssl.rc"
|
|
pidfile="/var/run/imapd-ssl.pid"
|
|
procname="%%PREFIX%%/sbin/courierlogger"
|
|
|
|
start_cmd="imapd_ssl_cmd start"
|
|
stop_cmd="imapd_ssl_cmd stop"
|
|
restart_cmd="imapd_ssl_cmd stop && imapd_ssl_cmd start"
|
|
|
|
load_rc_config $name
|
|
|
|
imapd_ssl_cmd () {
|
|
case $1 in
|
|
start)
|
|
echo "Starting ${name}."
|
|
${command} start
|
|
;;
|
|
stop)
|
|
echo "Stopping ${name}."
|
|
${command} stop
|
|
;;
|
|
esac
|
|
}
|
|
|
|
run_rc_command "$1"
|
|
|