The Free Software Media System - Server Backend & API
Remove restart.sh from packaging
Shadowghost6292e0127da0
diff --git a/debian/bin/restart.sh b/debian/bin/restart.shdeleted file mode 100755index 4847b918be..0000000000--- a/debian/bin/restart.sh+++ /dev/null@@ -1,56 +0,0 @@-#!/bin/bash--# restart.sh - Jellyfin server restart script-# Part of the Jellyfin project (https://github.com/jellyfin)-#-# This script restarts the Jellyfin daemon on Linux when using-# the Restart button on the admin dashboard. It supports the-# systemctl, service, and traditional /etc/init.d (sysv) restart-# methods, chosen automatically by which one is found first (in-# that order).-#-# This script is used by the Debian/Ubuntu/Fedora/CentOS packages.--# This is the Right Way(tm) to check if we are booted with-# systemd, according to sd_booted(3)-if [ -d /run/systemd/system ]; then- cmd=systemctl-else- # Everything else is really hard to figure out, so we just use- # service(8) if it's available - that works with most init- # systems/distributions I know of, including FreeBSD- if type service >/dev/null 2>&1; then- cmd=service- else- # If even service(8) isn't available, we just try /etc/init.d- # and hope for the best- if [ -d /etc/init.d ]; then- cmd=sysv- else- echo "Unable to detect a way to restart Jellyfin; bailing out" 1>&2- echo "Please report this bug to https://github.com/jellyfin/jellyfin/issues" 1>&2- exit 1- fi- fi-fi--if type sudo >/dev/null 2>&1; then- sudo_command=sudo-else- sudo_command=-fi--echo "Detected service control platform '$cmd'; using it to restart Jellyfin..."-case $cmd in- 'systemctl')- # Without systemd-run here, `jellyfin.service`'s shutdown terminates this process too- $sudo_command systemd-run systemctl restart jellyfin- ;;- 'service')- echo "sleep 0.5; $sudo_command service jellyfin start" | at now- ;;- 'sysv')- echo "sleep 0.5; /usr/bin/sudo /etc/init.d/jellyfin start" | at now- ;;-esac-exit 0diff --git a/debian/conf/jellyfin b/debian/conf/jellyfinindex 2f0630a9ce..9129967559 100644--- a/debian/conf/jellyfin+++ b/debian/conf/jellyfin@@ -21,9 +21,6 @@ JELLYFIN_CACHE_DIR="/var/cache/jellyfin"# web client path, installed by the jellyfin-web packageJELLYFIN_WEB_OPT="--webdir=/usr/share/jellyfin/web"-# Restart script for in-app server control-JELLYFIN_RESTART_OPT="--restartpath=/usr/lib/jellyfin/restart.sh"-# ffmpeg binary paths, overriding the system valuesJELLYFIN_FFMPEG_OPT="--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"@@ -50,4 +47,4 @@ JELLYFIN_ADDITIONAL_OPTS=""# Application usernameJELLYFIN_USER="jellyfin"# Full application command-JELLYFIN_ARGS="$JELLYFIN_WEB_OPT $JELLYFIN_RESTART_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLFIN_ADDITIONAL_OPTS"+JELLYFIN_ARGS="$JELLYFIN_WEB_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLFIN_ADDITIONAL_OPTS"diff --git a/debian/install b/debian/installindex 994322d141..593b13a7b3 100644--- a/debian/install+++ b/debian/install@@ -3,4 +3,3 @@ debian/conf/jellyfin etc/default/debian/conf/logging.json etc/jellyfin/debian/conf/jellyfin.service.conf etc/systemd/system/jellyfin.service.d/debian/conf/jellyfin-sudoers etc/sudoers.d/-debian/bin/restart.sh usr/lib/jellyfin/diff --git a/debian/jellyfin.service b/debian/jellyfin.serviceindex 1150924a08..2cc49f7c4a 100644--- a/debian/jellyfin.service+++ b/debian/jellyfin.service@@ -8,7 +8,7 @@ EnvironmentFile = /etc/default/jellyfinUser = jellyfinGroup = jellyfinWorkingDirectory = /var/lib/jellyfin-ExecStart = /usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_RESTART_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTS+ExecStart = /usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTSRestart = on-failureTimeoutSec = 15SuccessExitStatus=0 143diff --git a/debian/postinst b/debian/postinstindex a15442c76e..947959aa7a 100644--- a/debian/postinst+++ b/debian/postinst@@ -59,8 +59,6 @@ case "$1" inchgrp adm $PROGRAMDATA $CONFIGDATA $LOGDATA $CACHEDATAchmod 0750 $PROGRAMDATA $CONFIGDATA $LOGDATA $CACHEDATA- chmod +x /usr/lib/jellyfin/restart.sh > /dev/null 2>&1 || true-# Install jellyfin symlink into /usr/binln -sf /usr/lib/jellyfin/bin/jellyfin /usr/bin/jellyfindiff --git a/fedora/jellyfin.env b/fedora/jellyfin.envindex 1ccd8196fd..1f79fac4f6 100644--- a/fedora/jellyfin.env+++ b/fedora/jellyfin.env@@ -23,9 +23,6 @@ JELLYFIN_CACHE_DIR="/var/cache/jellyfin"# web client path, installed by the jellyfin-web package# JELLYFIN_WEB_OPT="--webdir=/usr/share/jellyfin-web"-# In-App service control-JELLYFIN_RESTART_OPT="--restartpath=/usr/libexec/jellyfin/restart.sh"-# [OPTIONAL] ffmpeg binary paths, overriding the UI-configured values#JELLYFIN_FFMPEG_OPT="--ffmpeg=/usr/bin/ffmpeg"diff --git a/fedora/jellyfin.service b/fedora/jellyfin.serviceindex 2fb9f30e00..1b3f8032c6 100644--- a/fedora/jellyfin.service+++ b/fedora/jellyfin.service@@ -8,7 +8,7 @@ EnvironmentFile = /etc/sysconfig/jellyfinUser = jellyfinGroup = jellyfinWorkingDirectory = /var/lib/jellyfin-ExecStart = /usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_RESTART_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTS+ExecStart = /usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTSRestart = on-failureTimeoutSec = 15SuccessExitStatus=0 143diff --git a/fedora/jellyfin.spec b/fedora/jellyfin.specindex 08de715370..2456877890 100644--- a/fedora/jellyfin.spec+++ b/fedora/jellyfin.spec@@ -17,10 +17,9 @@ Source0: jellyfin-server-%{version}.tar.gzSource11: jellyfin.serviceSource12: jellyfin.envSource13: jellyfin.sudoers-Source14: restart.sh-Source15: jellyfin.override.conf-Source16: jellyfin-firewalld.xml-Source17: jellyfin-server-lowports.conf+Source14: jellyfin.override.conf+Source15: jellyfin-firewalld.xml+Source16: jellyfin-server-lowports.conf%{?systemd_requires}BuildRequires: systemd@@ -76,16 +75,15 @@ dotnet publish --configuration Release --self-contained --runtime %{dotnet_runti%{__mkdir} -p %{buildroot}%{_libdir}/jellyfin %{buildroot}%{_bindir}%{__cp} -r Jellyfin.Server/bin/Release/net7.0/%{dotnet_runtime}/publish/* %{buildroot}%{_libdir}/jellyfinln -srf %{_libdir}/jellyfin/jellyfin %{buildroot}%{_bindir}/jellyfin-%{__install} -D %{SOURCE14} %{buildroot}%{_libexecdir}/jellyfin/restart.sh# Jellyfin config%{__install} -D Jellyfin.Server/Resources/Configuration/logging.json %{buildroot}%{_sysconfdir}/jellyfin/logging.json%{__install} -D %{SOURCE12} %{buildroot}%{_sysconfdir}/sysconfig/jellyfin# system config-%{__install} -D %{SOURCE16} %{buildroot}%{_prefix}/lib/firewalld/services/jellyfin.xml+%{__install} -D %{SOURCE15} %{buildroot}%{_prefix}/lib/firewalld/services/jellyfin.xml%{__install} -D %{SOURCE13} %{buildroot}%{_sysconfdir}/sudoers.d/jellyfin-sudoers-%{__install} -D %{SOURCE15} %{buildroot}%{_sysconfdir}/systemd/system/jellyfin.service.d/override.conf+%{__install} -D %{SOURCE14} %{buildroot}%{_sysconfdir}/systemd/system/jellyfin.service.d/override.conf%{__install} -D %{SOURCE11} %{buildroot}%{_unitdir}/jellyfin.service# empty directories@@ -95,7 +93,7 @@ ln -srf %{_libdir}/jellyfin/jellyfin %{buildroot}%{_bindir}/jellyfin%{__mkdir} -p %{buildroot}%{_var}/log/jellyfin# jellyfin-server-lowports subpackage-%{__install} -D -m 0644 %{SOURCE17} %{buildroot}%{_unitdir}/jellyfin.service.d/jellyfin-server-lowports.conf+%{__install} -D -m 0644 %{SOURCE16} %{buildroot}%{_unitdir}/jellyfin.service.d/jellyfin-server-lowports.conf%files@@ -110,7 +108,6 @@ ln -srf %{_libdir}/jellyfin/jellyfin %{buildroot}%{_bindir}/jellyfin%attr(755,root,root) %{_libdir}/jellyfin/createdump%attr(755,root,root) %{_libdir}/jellyfin/jellyfin%{_libdir}/jellyfin/*-%attr(755,root,root) %{_libexecdir}/jellyfin/restart.sh# Jellyfin config%config(noreplace) %attr(644,jellyfin,jellyfin) %{_sysconfdir}/jellyfin/logging.jsondiff --git a/fedora/restart.sh b/fedora/restart.shdeleted file mode 100755index 4847b918be..0000000000--- a/fedora/restart.sh+++ /dev/null@@ -1,56 +0,0 @@-#!/bin/bash--# restart.sh - Jellyfin server restart script-# Part of the Jellyfin project (https://github.com/jellyfin)-#-# This script restarts the Jellyfin daemon on Linux when using-# the Restart button on the admin dashboard. It supports the-# systemctl, service, and traditional /etc/init.d (sysv) restart-# methods, chosen automatically by which one is found first (in-# that order).-#-# This script is used by the Debian/Ubuntu/Fedora/CentOS packages.--# This is the Right Way(tm) to check if we are booted with-# systemd, according to sd_booted(3)-if [ -d /run/systemd/system ]; then- cmd=systemctl-else- # Everything else is really hard to figure out, so we just use- # service(8) if it's available - that works with most init- # systems/distributions I know of, including FreeBSD- if type service >/dev/null 2>&1; then- cmd=service- else- # If even service(8) isn't available, we just try /etc/init.d- # and hope for the best- if [ -d /etc/init.d ]; then- cmd=sysv- else- echo "Unable to detect a way to restart Jellyfin; bailing out" 1>&2- echo "Please report this bug to https://github.com/jellyfin/jellyfin/issues" 1>&2- exit 1- fi- fi-fi--if type sudo >/dev/null 2>&1; then- sudo_command=sudo-else- sudo_command=-fi--echo "Detected service control platform '$cmd'; using it to restart Jellyfin..."-case $cmd in- 'systemctl')- # Without systemd-run here, `jellyfin.service`'s shutdown terminates this process too- $sudo_command systemd-run systemctl restart jellyfin- ;;- 'service')- echo "sleep 0.5; $sudo_command service jellyfin start" | at now- ;;- 'sysv')- echo "sleep 0.5; /usr/bin/sudo /etc/init.d/jellyfin start" | at now- ;;-esac-exit 0