From 159a6e1cadb05355dc31b624b243370a8f788e23 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 9 Apr 2020 22:16:13 +0200 Subject: [PATCH] Simplify the openrc unit --- contrib/navidrome | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/contrib/navidrome b/contrib/navidrome index bf276fd05..bb6908797 100644 --- a/contrib/navidrome +++ b/contrib/navidrome @@ -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` -