From c6778ab66fc3c9eedcc70d4858f87ca5f2cc7c8c Mon Sep 17 00:00:00 2001 From: Fredrik Eriksson Date: Sun, 17 Jul 2022 09:27:05 +0200 Subject: [PATCH] update jellyfin init with new default paths --- media-tv/jellyfin-bin/files/jellyfin.init | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/media-tv/jellyfin-bin/files/jellyfin.init b/media-tv/jellyfin-bin/files/jellyfin.init index 820445a..1fbef4e 100644 --- a/media-tv/jellyfin-bin/files/jellyfin.init +++ b/media-tv/jellyfin-bin/files/jellyfin.init @@ -2,18 +2,19 @@ # Copyright 2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -: ${jellyfin_user:=jellyfin} +: ${jellyfin_user:=${RC_SVCNAME}} +: ${jellyfin_group:=${RC_SVCNAME}} : ${config_dir:=/etc/jellyfin} : ${log_dir:=/var/log/jellyfin} -: ${data_dir:=/var/lib/jellyfin/data} -: ${cache_dir:=/var/lib/jellyfin/cache} +: ${data_dir:=/var/lib/jellyfin} +: ${cache_dir:=/var/cache/jellyfin} name="jellyfin" description="Jellyfin Daemon" -pidfile=/var/run/${RC_SVCNAME}.pid +pidfile=/run/${RC_SVCNAME}.pid command=/opt/jellyfin/jellyfin -command_background=yes -command_user=${jellyfin_user} +command_background=true +command_user="${jellyfin_user}:${jellyfin_group}" command_args="-c ${config_dir} -l ${log_dir} -d ${data_dir} -C ${cache_dir}" depend() { @@ -27,6 +28,14 @@ start_pre() { if [ -n "${https_proxy}" ]; then export https_proxy="${https_proxy}" fi + checkpath --directory --owner ${jellyfin_user}:${jellyfin_group} \ + --mode 0775 ${cache_dir} + checkpath --directory --owner ${jellyfin_user}:${jellyfin_group} \ + --mode 0775 ${data_dir} + checkpath --directory --owner ${jellyfin_user}:${jellyfin_group} \ + --mode 0775 ${log_dir} + checkpath --directory --owner ${jellyfin_user}:${jellyfin_group} \ + --mode 0775 ${config_dir} } restart() {