update jellyfin init with new default paths

This commit is contained in:
Fredrik Eriksson 2022-07-17 09:27:05 +02:00
parent 5e41d1a2a2
commit c6778ab66f
Signed by: feffe
GPG Key ID: 97FD478B50475788
1 changed files with 15 additions and 6 deletions

View File

@ -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() {