Index: head/mail/spampd/Makefile =================================================================== --- head/mail/spampd/Makefile (revision 396499) +++ head/mail/spampd/Makefile (revision 396500) @@ -1,28 +1,30 @@ # Created by: chris # $FreeBSD$ PORTNAME= spampd PORTVERSION= 2.42 +PORTREVISION= 1 CATEGORIES= mail perl5 MAINTAINER= des@FreeBSD.org COMMENT= Spamassassin SMTP Proxy LICENSE= GPLv2 RUN_DEPENDS= spamc:${PORTSDIR}/mail/spamassassin \ p5-Net-Server>=0:${PORTSDIR}/net/p5-Net-Server 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 GH_ACCOUNT= mpaperno do-install: ${INSTALL_SCRIPT} ${WRKSRC}/spampd.pl ${STAGEDIR}${PREFIX}/sbin/spampd .include Index: head/mail/spampd/files/spampd.in =================================================================== --- head/mail/spampd/files/spampd.in (revision 396499) +++ head/mail/spampd/files/spampd.in (revision 396500) @@ -1,50 +1,30 @@ #!/bin/sh # # PROVIDE: spampd # REQUIRE: LOGIN # BEFORE: mail # KEYWORD: shutdown # # Add the fellowing line to /etc/rc.conf to enable spampd: # # spampd_enable (bool): Set it to "YES" to enable spampd # Default is "NO" # spampd_flags . /etc/rc.subr name="spampd" rcvar=spampd_enable : ${spampd_enable="NO"} : ${spampd_pidfile="/var/run/spamd/spampd.pid"} : ${spampd_flags="--user=spamd --group=spamd --host 127.0.0.1:10024 --relayhost=127.0.0.1:10025 --dose --tagall --auto-whitelist"} 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