|
Lines 21-45
Link Here
|
| 21 |
: ${nzbget_enable:=NO} |
21 |
: ${nzbget_enable:=NO} |
| 22 |
|
22 |
|
| 23 |
command=%%PREFIX%%/bin/nzbget |
23 |
command=%%PREFIX%%/bin/nzbget |
| 24 |
start_cmd="${name}_start" |
24 |
command_args="-D" |
| 25 |
status_cmd="${command} -L S" |
|
|
| 26 |
stop_cmd="${name}_stop" |
| 27 |
|
25 |
|
| 28 |
nzbget_start() |
|
|
| 29 |
{ |
| 30 |
echo "Starting ${name}." |
| 31 |
# artificial sleep because it doesnt want to start |
| 32 |
# after a restart without it |
| 33 |
sleep .5 |
| 34 |
${command} -D |
| 35 |
} |
| 36 |
|
| 37 |
nzbget_stop() |
| 38 |
{ |
| 39 |
echo "Stopping ${name}." |
| 40 |
${command} -Q |
| 41 |
# artificial sleep because stop is backgrounded |
| 42 |
sleep 3 |
| 43 |
} |
| 44 |
|
| 45 |
run_rc_command "$1" |
26 |
run_rc_command "$1" |