From 15caa8e3a5bbee409d90484144d28b8c42215808 Mon Sep 17 00:00:00 2001 From: des Date: Wed, 9 Sep 2015 14:02:06 +0000 Subject: Fix rc script so status and restart work. --- mail/spampd/Makefile | 2 ++ mail/spampd/files/spampd.in | 22 +--------------------- 2 files changed, 3 insertions(+), 21 deletions(-) (limited to 'mail/spampd') diff --git a/mail/spampd/Makefile b/mail/spampd/Makefile index 7e9a6c445097..ed6b1d73f71f 100644 --- a/mail/spampd/Makefile +++ b/mail/spampd/Makefile @@ -3,6 +3,7 @@ PORTNAME= spampd PORTVERSION= 2.42 +PORTREVISION= 1 CATEGORIES= mail perl5 MAINTAINER= des@FreeBSD.org @@ -17,6 +18,7 @@ NO_BUILD= yes PLIST_FILES= sbin/spampd USES= perl5 shebangfix SHEBANG_FILES= spampd.pl +SUB_LIST= PERL=${PERL} USE_RC_SUBR= spampd USE_GITHUB= yes diff --git a/mail/spampd/files/spampd.in b/mail/spampd/files/spampd.in index ce60c2c7e0c6..3e96197e5517 100644 --- a/mail/spampd/files/spampd.in +++ b/mail/spampd/files/spampd.in @@ -24,27 +24,7 @@ load_rc_config $name command="%%PREFIX%%/sbin/$name" command_args="--pid=${spampd_pidfile}" +command_interpreter=%%PERL%% pidfile="${spampd_pidfile}" -sig_stop="KILL" -stop_cmd="stop_cmd" -status_cmd="status_cmd" - -stop_cmd() -{ - if [ -f "$pidfile" ]; then - kill `cat $pidfile` - rm -f $pidfile - echo -n " spampd" - fi -} - -status_cmd() -{ - if [ -f "$pidfile" ]; then - echo "${name} is running as pid `cat $pidfile`." - else - echo "${name} is not running." - fi -} run_rc_command $1 -- cgit