mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-07 01:32:26 +01:00
34 lines
629 B
Bash
34 lines
629 B
Bash
#!/sbin/openrc-run
|
|
|
|
# fallback values for /etc/conf.d/autobrr
|
|
: ${command_user:=autobrr:autobrr}
|
|
: ${directory:=/var/lib/autobrr}
|
|
|
|
name=autobrr
|
|
description="autobrr daemon"
|
|
command="/usr/bin/autobrr"
|
|
command_args="--config=$directory"
|
|
command_background=true
|
|
pidfile="/run/$name.pid"
|
|
|
|
depend() {
|
|
need net
|
|
use dns logger
|
|
}
|
|
|
|
start_pre() {
|
|
checkpath -d -o "$command_user" "$directory"
|
|
|
|
if [ -n "$logdir" ]; then
|
|
checkpath -d -o "$command_user" "$logdir"
|
|
fi
|
|
|
|
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
|
|
}
|