mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 04:27:37 +03:00
Simplify the openrc unit
This commit is contained in:
parent
b429949dd9
commit
159a6e1cad
1 changed files with 6 additions and 12 deletions
|
@ -1,21 +1,15 @@
|
||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
name=$RC_SVCNAME
|
name=$RC_SVCNAME
|
||||||
command="/opt/navidrome/navidrome"
|
command="/opt/navidrome/${RC_SVCNAME}"
|
||||||
command_args="-datafolder=/opt/navidrome"
|
command_args="-datafolder /opt/navidrome"
|
||||||
command_user="navidrome"
|
command_user="${RC_SVCNAME}"
|
||||||
pidfile="/var/run/$RC_SVCNAME.pid"
|
pidfile="/var/run/${RC_SVCNAME}.pid"
|
||||||
|
output_log="/opt/navidrome/${RC_SVCNAME}.log"
|
||||||
|
error_log="/opt/navidrome/${RC_SVCNAME}.err"
|
||||||
command_background="yes"
|
command_background="yes"
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
need net
|
need net
|
||||||
}
|
}
|
||||||
|
|
||||||
start_pre() {
|
|
||||||
checkpath --directory --owner $command_user:$command_user --mode 0775 \
|
|
||||||
/run/$RC_SVCNAME /var/log/$RC_SVCNAME
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
kill `cat /var/run/$RC_SVCNAME.pid`
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue