aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorDominik <git@secnd.me>2023-06-15 19:38:42 +0200
committerGitHub <noreply@github.com>2023-06-15 19:38:42 +0200
commit17f1e8d19b1fd693893d66d2275ed8ae2476344e (patch)
tree7f48be975faa92042769870957587b3c7864f631 /debian
parente8ae7e5c38e28f13fa8de295e26c930cb46d9b79 (diff)
parent6771b5cabe96b4b3cbd1cd0c998d564f3dd17ed4 (diff)
Merge branch 'master' into segment-deletion
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/bin/restart.sh56
-rw-r--r--debian/conf/jellyfin5
-rw-r--r--debian/conf/jellyfin-sudoers33
-rw-r--r--debian/control7
-rw-r--r--debian/install2
-rw-r--r--debian/jellyfin.service2
-rw-r--r--debian/postinst14
7 files changed, 16 insertions, 103 deletions
diff --git a/debian/bin/restart.sh b/debian/bin/restart.sh
deleted file mode 100755
index 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 0
diff --git a/debian/conf/jellyfin b/debian/conf/jellyfin
index 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 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"
diff --git a/debian/conf/jellyfin-sudoers b/debian/conf/jellyfin-sudoers
deleted file mode 100644
index 795fd17e83..0000000000
--- a/debian/conf/jellyfin-sudoers
+++ /dev/null
@@ -1,33 +0,0 @@
-#Allow jellyfin group to start, stop and restart itself
-Cmnd_Alias RESTARTSERVER_SYSV = /sbin/service jellyfin restart, /usr/sbin/service jellyfin restart
-Cmnd_Alias STARTSERVER_SYSV = /sbin/service jellyfin start, /usr/sbin/service jellyfin start
-Cmnd_Alias STOPSERVER_SYSV = /sbin/service jellyfin stop, /usr/sbin/service jellyfin stop
-Cmnd_Alias RESTARTSERVER_SYSTEMD = /usr/bin/systemd-run systemctl restart jellyfin
-Cmnd_Alias STARTSERVER_SYSTEMD = /usr/bin/systemd-run systemctl start jellyfin
-Cmnd_Alias STOPSERVER_SYSTEMD = /usr/bin/systemd-run systemctl stop jellyfin
-Cmnd_Alias RESTARTSERVER_INITD = /etc/init.d/jellyfin restart
-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
-
-Defaults!RESTARTSERVER_SYSV !requiretty
-Defaults!STARTSERVER_SYSV !requiretty
-Defaults!STOPSERVER_SYSV !requiretty
-Defaults!RESTARTSERVER_SYSTEMD !requiretty
-Defaults!STARTSERVER_SYSTEMD !requiretty
-Defaults!STOPSERVER_SYSTEMD !requiretty
-Defaults!RESTARTSERVER_INITD !requiretty
-Defaults!STARTSERVER_INITD !requiretty
-Defaults!STOPSERVER_INITD !requiretty
-
-Defaults:jellyfin !requiretty
diff --git a/debian/control b/debian/control
index dea48d9482..0b9dd570e4 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: misc
Priority: optional
Maintainer: Jellyfin Team <team@jellyfin.org>
Build-Depends: debhelper (>= 9),
- dotnet-sdk-6.0,
+ dotnet-sdk-7.0,
libc6-dev,
libcurl4-openssl-dev,
libfontconfig1-dev,
@@ -18,11 +18,10 @@ Package: jellyfin-server
Replaces: jellyfin (<<10.6.0)
Breaks: jellyfin (<<10.6.0)
Architecture: any
-Depends: at,
- libsqlite3-0,
+Depends: libsqlite3-0,
libfontconfig1,
libfreetype6,
libssl1.1 | libssl3
-Recommends: jellyfin-web, sudo
+Recommends: jellyfin-web
Description: Jellyfin is the Free Software Media System.
This package provides the Jellyfin server backend and API.
diff --git a/debian/install b/debian/install
index 994322d141..0b48dd7a25 100644
--- a/debian/install
+++ b/debian/install
@@ -2,5 +2,3 @@ usr/lib/jellyfin usr/lib/
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.service
index 1150924a08..2cc49f7c4a 100644
--- a/debian/jellyfin.service
+++ b/debian/jellyfin.service
@@ -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
diff --git a/debian/postinst b/debian/postinst
index 2f9c4cffbf..947959aa7a 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -10,6 +10,8 @@ if [[ -f $DEFAULT_FILE ]]; then
fi
JELLYFIN_USER=${JELLYFIN_USER:-jellyfin}
+RENDER_GROUP=${RENDER_GROUP:-render}
+VIDEO_GROUP=${VIDEO_GROUP:-video}
# Data directories for program data (cache, db), configs, and logs
PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME}
@@ -28,6 +30,14 @@ case "$1" in
adduser --system --ingroup ${JELLYFIN_USER} --shell /bin/false ${JELLYFIN_USER} --no-create-home --home ${PROGRAMDATA} \
--gecos "Jellyfin default user" > /dev/null 2>&1
fi
+ # add jellyfin to the render group for hwa
+ if [[ ! -z "$(getent group ${RENDER_GROUP})" ]]; then
+ usermod -aG ${RENDER_GROUP} ${JELLYFIN_USER} > /dev/null 2>&1
+ fi
+ # add jellyfin to the video group for hwa
+ if [[ ! -z "$(getent group ${VIDEO_GROUP})" ]]; then
+ usermod -aG ${VIDEO_GROUP} ${JELLYFIN_USER} > /dev/null 2>&1
+ fi
# ensure $PROGRAMDATA exists
if [[ ! -d $PROGRAMDATA ]]; then
mkdir $PROGRAMDATA
@@ -49,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
@@ -83,7 +91,7 @@ fi
# End automatically added section
# Automatically added by dh_installinit
if [[ "$1" == "configure" ]] || [[ "$1" == "abort-upgrade" ]]; then
- if [[ -d "/run/systemd/systemd" ]]; then
+ if [[ -d "/run/systemd/system" ]]; then
systemctl --system daemon-reload >/dev/null || true
deb-systemd-invoke start jellyfin >/dev/null || true
elif [[ -x "/etc/init.d/jellyfin" ]] || [[ -e "/etc/init/jellyfin.conf" ]]; then