mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 12:44:19 +01:00
Remove restart.sh from packaging
This commit is contained in:
56
debian/bin/restart.sh
vendored
56
debian/bin/restart.sh
vendored
@@ -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
|
||||
5
debian/conf/jellyfin
vendored
5
debian/conf/jellyfin
vendored
@@ -21,9 +21,6 @@ JELLYFIN_CACHE_DIR="/var/cache/jellyfin"
|
||||
# web client path, installed by the jellyfin-web package
|
||||
JELLYFIN_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 values
|
||||
JELLYFIN_FFMPEG_OPT="--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"
|
||||
|
||||
@@ -50,4 +47,4 @@ JELLYFIN_ADDITIONAL_OPTS=""
|
||||
# Application username
|
||||
JELLYFIN_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"
|
||||
|
||||
1
debian/install
vendored
1
debian/install
vendored
@@ -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/
|
||||
|
||||
2
debian/jellyfin.service
vendored
2
debian/jellyfin.service
vendored
@@ -8,7 +8,7 @@ EnvironmentFile = /etc/default/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_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTS
|
||||
Restart = on-failure
|
||||
TimeoutSec = 15
|
||||
SuccessExitStatus=0 143
|
||||
|
||||
2
debian/postinst
vendored
2
debian/postinst
vendored
@@ -59,8 +59,6 @@ case "$1" in
|
||||
chgrp adm $PROGRAMDATA $CONFIGDATA $LOGDATA $CACHEDATA
|
||||
chmod 0750 $PROGRAMDATA $CONFIGDATA $LOGDATA $CACHEDATA
|
||||
|
||||
chmod +x /usr/lib/jellyfin/restart.sh > /dev/null 2>&1 || true
|
||||
|
||||
# Install jellyfin symlink into /usr/bin
|
||||
ln -sf /usr/lib/jellyfin/bin/jellyfin /usr/bin/jellyfin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user