mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-01 19:47: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
|
||||
|
||||
name=$RC_SVCNAME
|
||||
command="/opt/navidrome/navidrome"
|
||||
command_args="-datafolder=/opt/navidrome"
|
||||
command_user="navidrome"
|
||||
pidfile="/var/run/$RC_SVCNAME.pid"
|
||||
command="/opt/navidrome/${RC_SVCNAME}"
|
||||
command_args="-datafolder /opt/navidrome"
|
||||
command_user="${RC_SVCNAME}"
|
||||
pidfile="/var/run/${RC_SVCNAME}.pid"
|
||||
output_log="/opt/navidrome/${RC_SVCNAME}.log"
|
||||
error_log="/opt/navidrome/${RC_SVCNAME}.err"
|
||||
command_background="yes"
|
||||
|
||||
depend() {
|
||||
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