1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-02 01:20:54 +00:00

Fix rc script so status and restart work.

This commit is contained in:
Dag-Erling Smørgrav 2015-09-09 14:02:06 +00:00
parent c8291cbdac
commit f0f4775549
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=396500
2 changed files with 3 additions and 21 deletions

View File

@ -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

View File

@ -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