From f0e74c2c6b3fa8c94f0da222cde20a6b173db0b0 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Mon, 4 Feb 2019 00:26:23 -0500 Subject: [PATCH 1/3] Fix restart script for Debian --- .../debian-package-x64/pkg-src/bin/restart.sh | 10 ++++---- .../pkg-src/conf/jellyfin-sudoers | 24 +++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/deployment/debian-package-x64/pkg-src/bin/restart.sh b/deployment/debian-package-x64/pkg-src/bin/restart.sh index a6f4632ba..738f86727 100644 --- a/deployment/debian-package-x64/pkg-src/bin/restart.sh +++ b/deployment/debian-package-x64/pkg-src/bin/restart.sh @@ -2,10 +2,12 @@ NAME=jellyfin -restart_cmds=("s6-svc -t /var/run/s6/services/${NAME}" \ - "systemctl restart ${NAME}" \ - "service ${NAME} restart" \ - "/etc/init.d/${NAME} restart") +restart_cmds=( + "systemctl restart ${NAME}" + "service ${NAME} restart" + "/etc/init.d/${NAME} restart" + "s6-svc -t /var/run/s6/services/${NAME}" +) for restart_cmd in "${restart_cmds[@]}"; do cmd=$(echo "$restart_cmd" | awk '{print $1}') diff --git a/deployment/debian-package-x64/pkg-src/conf/jellyfin-sudoers b/deployment/debian-package-x64/pkg-src/conf/jellyfin-sudoers index 4eb91366b..b481ba4ad 100644 --- a/deployment/debian-package-x64/pkg-src/conf/jellyfin-sudoers +++ b/deployment/debian-package-x64/pkg-src/conf/jellyfin-sudoers @@ -10,15 +10,15 @@ Cmnd_Alias STARTSERVER_INITD = /etc/init.d/jellyfin start Cmnd_Alias STOPSERVER_INITD = /etc/init.d/jellyfin stop -%jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSV -%jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_SYSV -%jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_SYSV -%jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSTEMD -%jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_SYSTEMD -%jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_SYSTEMD -%jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_INITD -%jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_INITD -%jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_INITD +jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSV +jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_SYSV +jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_SYSV +jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSTEMD +jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_SYSTEMD +jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_SYSTEMD +jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_INITD +jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_INITD +jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_INITD Defaults!RESTARTSERVER_SYSV !requiretty Defaults!STARTSERVER_SYSV !requiretty @@ -31,7 +31,7 @@ Defaults!STARTSERVER_INITD !requiretty Defaults!STOPSERVER_INITD !requiretty #Allow the server to mount iso images -%jellyfin ALL=(ALL) NOPASSWD: /bin/mount -%jellyfin ALL=(ALL) NOPASSWD: /bin/umount +jellyfin ALL=(ALL) NOPASSWD: /bin/mount +jellyfin ALL=(ALL) NOPASSWD: /bin/umount -Defaults:%jellyfin !requiretty +Defaults:jellyfin !requiretty From 72beadc74d524a5878feddb1769faab9296d38f7 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Mon, 4 Feb 2019 00:27:00 -0500 Subject: [PATCH 2/3] Fix restart script for Fedora/CentOS --- .../fedora-package-x64/pkg-src/jellyfin.sudoers | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/deployment/fedora-package-x64/pkg-src/jellyfin.sudoers b/deployment/fedora-package-x64/pkg-src/jellyfin.sudoers index b31d52f7e..ddd890ce1 100644 --- a/deployment/fedora-package-x64/pkg-src/jellyfin.sudoers +++ b/deployment/fedora-package-x64/pkg-src/jellyfin.sudoers @@ -4,16 +4,16 @@ Cmnd_Alias STARTSERVER_SYSTEMD = /usr/bin/systemctl start jellyfin, /bin/systemc Cmnd_Alias STOPSERVER_SYSTEMD = /usr/bin/systemctl stop jellyfin, /bin/systemctl stop jellyfin -%jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSTEMD -%jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_SYSTEMD -%jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_SYSTEMD +jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSTEMD +jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_SYSTEMD +jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_SYSTEMD Defaults!RESTARTSERVER_SYSTEMD !requiretty Defaults!STARTSERVER_SYSTEMD !requiretty Defaults!STOPSERVER_SYSTEMD !requiretty # Uncomment to allow the server to mount iso images -# %jellyfin ALL=(ALL) NOPASSWD: /bin/mount -# %jellyfin ALL=(ALL) NOPASSWD: /bin/umount +# jellyfin ALL=(ALL) NOPASSWD: /bin/mount +# jellyfin ALL=(ALL) NOPASSWD: /bin/umount -Defaults:%jellyfin !requiretty +Defaults:jellyfin !requiretty From b8b650540d604dce7f9066cae6765488f4138198 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Wed, 6 Feb 2019 09:33:14 -0500 Subject: [PATCH 3/3] Allow Fedora/CentOS mounting by default --- deployment/fedora-package-x64/pkg-src/jellyfin.sudoers | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deployment/fedora-package-x64/pkg-src/jellyfin.sudoers b/deployment/fedora-package-x64/pkg-src/jellyfin.sudoers index ddd890ce1..dd245af4b 100644 --- a/deployment/fedora-package-x64/pkg-src/jellyfin.sudoers +++ b/deployment/fedora-package-x64/pkg-src/jellyfin.sudoers @@ -12,8 +12,8 @@ Defaults!RESTARTSERVER_SYSTEMD !requiretty Defaults!STARTSERVER_SYSTEMD !requiretty Defaults!STOPSERVER_SYSTEMD !requiretty -# Uncomment to allow the server to mount iso images -# jellyfin ALL=(ALL) NOPASSWD: /bin/mount -# jellyfin ALL=(ALL) NOPASSWD: /bin/umount +# Allow the server to mount iso images +jellyfin ALL=(ALL) NOPASSWD: /bin/mount +jellyfin ALL=(ALL) NOPASSWD: /bin/umount Defaults:jellyfin !requiretty