mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 21:56:40 +02:00
38 lines
817 B
Bash
38 lines
817 B
Bash
#!/sbin/openrc-run
|
|
|
|
# fallback values for /etc/conf.d/nzbget
|
|
: ${command_user:=nzbget:nzbget}
|
|
: ${directory:=/var/lib/nzbget}
|
|
: ${configfile:=$directory/nzbget.conf}
|
|
: ${webdir:=/usr/share/webapps/nzbget}
|
|
|
|
name=nzbget
|
|
description="nzbget daemon"
|
|
command="/usr/bin/nzbget"
|
|
command_args="
|
|
--server
|
|
--configfile $configfile
|
|
--option WebDir=$webdir
|
|
--option ConfigTemplate=/usr/share/nzbget/nzbget.conf
|
|
--option WriteLog=none
|
|
$command_args"
|
|
command_background=true
|
|
pidfile="/run/$name.pid"
|
|
|
|
depend() {
|
|
need net
|
|
use dns logger netmount
|
|
}
|
|
|
|
start_pre() {
|
|
checkpath -d -o "$command_user" "$directory"
|
|
checkpath -f -o "$command_user" "$configfile"
|
|
|
|
if [ -n "$output_log" ]; then
|
|
checkpath -f -o "$command_user" "$output_log"
|
|
fi
|
|
|
|
if [ -n "$error_log" ]; then
|
|
checkpath -f -o "$command_user" "$error_log"
|
|
fi
|
|
}
|