From ae5215e025daae99b3ebfe22cd65310eebbdfc70 Mon Sep 17 00:00:00 2001 From: Dirk Meyer Date: Thu, 16 Apr 2020 14:49:59 +0000 Subject: - cleanup rc.d script --- mail/spamilter/Makefile | 2 +- mail/spamilter/files/spamilter.in | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'mail/spamilter') diff --git a/mail/spamilter/Makefile b/mail/spamilter/Makefile index 227dbd004ad1..e182099bbf46 100644 --- a/mail/spamilter/Makefile +++ b/mail/spamilter/Makefile @@ -2,7 +2,7 @@ PORTNAME= spamilter PORTVERSION= 0.60 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= mail MASTER_SITES= http://www.wanlink.com/spamilter/download/ diff --git a/mail/spamilter/files/spamilter.in b/mail/spamilter/files/spamilter.in index 645b044d61c2..ddcb1268d0a0 100644 --- a/mail/spamilter/files/spamilter.in +++ b/mail/spamilter/files/spamilter.in @@ -1,15 +1,12 @@ #!/bin/sh - +# # $FreeBSD$ - -# Start or stop spamilter - +# # PROVIDE: spamilter # REQUIRE: DAEMON # BEFORE: mail # KEYWORD: shutdown # - # Define these spamilter_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local @@ -19,26 +16,30 @@ # # spamilter_flags Flags to spamilter -spamilter_enable=${spamilter_enable:-"NO"} # Enable spamilter-milter - . /etc/rc.subr name="spamilter" +desc="Spamilter (SPAM Milter) Daemon" rcvar="spamilter_enable" + +load_rc_config $name + +: ${spamilter_enable:="NO"} + command="%%PREFIX%%/bin/spamilter" pidfile="/tmp/Spamilter.pid" required_files="%%PREFIX%%/etc/spamilter.rc" start_precmd="spamilter_prestart" stop_postcmd="spamilter_poststop" -spamilter_prestart() { +spamilter_prestart() +{ /bin/rm -f "${pidfile}" } -spamilter_poststop() { +spamilter_poststop() +{ /bin/rm -f "${pidfile}" } -load_rc_config $name - run_rc_command "$1" -- cgit v1.2.3