08140ceea2
PR: 203199 Submitted by: Dmitry Marakasov
39 lines
778 B
Bash
39 lines
778 B
Bash
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
|
|
# Start or stop milterregex
|
|
|
|
# PROVIDE: milterregex
|
|
# REQUIRE: DAEMON
|
|
# BEFORE: mail
|
|
# KEYWORD: shutdown
|
|
|
|
spooldir=%%SPOOLDIR%%
|
|
|
|
# Define these milterregex_* variables in one of these files:
|
|
# /etc/rc.conf
|
|
# /etc/rc.conf.local
|
|
# /etc/rc.conf.d/milterregex
|
|
#
|
|
# DO NOT CHANGE THESE DEFAULT VALUES HERE
|
|
#
|
|
# milterregex_flags Flags to milter-regex program
|
|
|
|
[ -z "$milterregex_enable" ] && milterregex_enable="NO" # Enable milter-regex
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="milterregex"
|
|
rcvar="milterregex_enable"
|
|
command="%%PREFIX%%/libexec/milter-regex"
|
|
pidfile="${spooldir}/milter-regex.pid"
|
|
required_files="%%PREFIX%%/etc/milter-regex.conf"
|
|
stop_postcmd="milterregex_poststop"
|
|
|
|
milterregex_poststop() {
|
|
/bin/rm -f ${pidfile}
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|