news/nzbget: rc script improvement

nzbget obeys normal signals. Use them instead of needlessly complicating
the rc script.

PR:		216894
Approved by:	maintainer timeout
MFH:		2017Q1
This commit is contained in:
Mark Felder 2017-02-22 22:24:16 +00:00
parent f52fb30b55
commit fd22dbb368
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=434648
2 changed files with 2 additions and 21 deletions

View file

@ -4,7 +4,7 @@
PORTNAME= nzbget PORTNAME= nzbget
PORTVERSION= 17.1 PORTVERSION= 17.1
DISTVERSIONPREFIX= v DISTVERSIONPREFIX= v
PORTREVISION= 1 PORTREVISION= 2
CATEGORIES= news CATEGORIES= news
MAINTAINER= toxic@doobie.com MAINTAINER= toxic@doobie.com

View file

@ -21,25 +21,6 @@ load_rc_config ${name}
: ${nzbget_enable:=NO} : ${nzbget_enable:=NO}
command=%%PREFIX%%/bin/nzbget command=%%PREFIX%%/bin/nzbget
start_cmd="${name}_start" command_args="-D"
status_cmd="${command} -L S"
stop_cmd="${name}_stop"
nzbget_start()
{
echo "Starting ${name}."
# artificial sleep because it doesnt want to start
# after a restart without it
sleep .5
${command} -D
}
nzbget_stop()
{
echo "Stopping ${name}."
${command} -Q
# artificial sleep because stop is backgrounded
sleep 3
}
run_rc_command "$1" run_rc_command "$1"