Add an openrc unit file

This commit is contained in:
jvoisin 2020-04-05 18:46:26 +02:00 committed by Deluan Quintão
parent 86a23f9b14
commit 2b5433dc6e
1 changed files with 21 additions and 0 deletions

21
contrib/navidrome Normal file
View File

@ -0,0 +1,21 @@
#!/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_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`