diff options
Diffstat (limited to 'mail/milter-regex/files/milterregex.in')
-rw-r--r-- | mail/milter-regex/files/milterregex.in | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/mail/milter-regex/files/milterregex.in b/mail/milter-regex/files/milterregex.in new file mode 100644 index 000000000000..de4ef12fa921 --- /dev/null +++ b/mail/milter-regex/files/milterregex.in @@ -0,0 +1,39 @@ +#!/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" |