diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2023-01-19 10:32:11 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2023-01-19 10:32:11 +0100 |
| commit | 6292e0127da0089d7a94ac7a164d3f8dc3952c6c (patch) | |
| tree | 716da4b225cec6702cdd1a78655d48ab496a584d /fedora | |
| parent | d57dcf22452db4990aa2cdece3eb798ba98b8330 (diff) | |
Remove restart.sh from packaging
Diffstat (limited to 'fedora')
| -rw-r--r-- | fedora/jellyfin.env | 3 | ||||
| -rw-r--r-- | fedora/jellyfin.service | 2 | ||||
| -rw-r--r-- | fedora/jellyfin.spec | 15 | ||||
| -rwxr-xr-x | fedora/restart.sh | 56 |
4 files changed, 7 insertions, 69 deletions
diff --git a/fedora/jellyfin.env b/fedora/jellyfin.env index 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.service index 2fb9f30e00..1b3f8032c6 100644 --- a/fedora/jellyfin.service +++ b/fedora/jellyfin.service @@ -8,7 +8,7 @@ EnvironmentFile = /etc/sysconfig/jellyfin User = jellyfin Group = jellyfin WorkingDirectory = /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_OPTS Restart = on-failure TimeoutSec = 15 SuccessExitStatus=0 143 diff --git a/fedora/jellyfin.spec b/fedora/jellyfin.spec index 08de715370..2456877890 100644 --- a/fedora/jellyfin.spec +++ b/fedora/jellyfin.spec @@ -17,10 +17,9 @@ Source0: jellyfin-server-%{version}.tar.gz Source11: jellyfin.service Source12: jellyfin.env Source13: 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}/jellyfin ln -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.json diff --git a/fedora/restart.sh b/fedora/restart.sh deleted file mode 100755 index 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 |
