diff options
Diffstat (limited to 'mail/noattach')
-rw-r--r-- | mail/noattach/Makefile | 2 | ||||
-rw-r--r-- | mail/noattach/files/noattach.in | 26 |
2 files changed, 16 insertions, 12 deletions
diff --git a/mail/noattach/Makefile b/mail/noattach/Makefile index 1691678df51e..a7922d9c2cda 100644 --- a/mail/noattach/Makefile +++ b/mail/noattach/Makefile @@ -2,7 +2,7 @@ PORTNAME= noattach PORTVERSION= 1.2 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= mail MASTER_SITES= ftp://ftp.dinoex.de/pub/FreeBSD/distfiles/ diff --git a/mail/noattach/files/noattach.in b/mail/noattach/files/noattach.in index ac167c52feca..3e4d40f44818 100644 --- a/mail/noattach/files/noattach.in +++ b/mail/noattach/files/noattach.in @@ -19,35 +19,39 @@ # # noattach_flags Flags to noattach -noattach_enable=${noattach_enable:-"NO"} # Enable noattach -noattach_pidfile=${noattach_pidfile:-"/var/run/noattach.pid"} # Path to pidfile -noattach_socket=${noattach_socket:-"/var/run/noattach"} # Path to socket - . /etc/rc.subr name="noattach" +desc="Noattach Milter Daemon" rcvar="noattach_enable" + +load_rc_config $name + +: ${noattach_enable:="NO"} +: ${noattach_pidfile:="/var/run/noattach.pid"} +: ${noattach_socket:="/var/run/noattach"} command="%%PREFIX%%/libexec/${name}" required_files="%%PREFIX%%/etc/noattach.patterns" start_precmd="noattach_prestart" stop_postcmd="noattach_poststop" reload_cmd="noattach_reload" extra_commands="reload" +pidfile="${noattach_pidfile}" +command_args="-p local:${noattach_socket} ${noattach_flags}" -noattach_prestart() { +noattach_prestart() +{ /bin/rm -f "${pidfile}" "${noattach_socket}" } -noattach_poststop() { +noattach_poststop() +{ /bin/rm -f "${pidfile}" "${noattach_socket}" } -noattach_reload() { +noattach_reload() +{ kill -USR1 `head -1 "${pidfile}"` } -load_rc_config $name -pidfile="${noattach_pidfile}" -command_args="-p local:${noattach_socket} ${noattach_flags}" - run_rc_command "$1" |