Replace the name emby/emby-server with jellyfin everywhere.pull/1154/head
parent
20c2dcf834
commit
8fcec19936
@ -1,121 +0,0 @@
|
||||
#!/bin/bash
|
||||
# vim:set ft=sh sw=2 sts=2 st=2 et:
|
||||
# Author: HurricaneHernandez <carlos@techbyte.ca>
|
||||
# Modified for CentOS/Fedora by: FC7 <casasfernando@outlook.com>
|
||||
|
||||
DESC=EmbyServer
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
NAME=emby-server
|
||||
CONF_FILE=/etc/${NAME}.conf
|
||||
DEFAULT_FILE=/etc/default/${NAME}
|
||||
SCRIPTNAME=/usr/bin/emby-server
|
||||
|
||||
# Source Emby server default configuration
|
||||
. $DEFAULT_FILE
|
||||
|
||||
# Source Emby server user configuration overrides
|
||||
if [[ -f $CONF_FILE ]]; then
|
||||
. $CONF_FILE
|
||||
else
|
||||
echo "${CONF_FILE} not found using default settings.";
|
||||
fi
|
||||
|
||||
# Ensure the runas user has restart privilege to restart the service if not try to add the user to emby group. WARN on failure
|
||||
if [[ "$EMBY_USER" != "emby" ]]; then
|
||||
groups $EMBY_USER | grep -q emby
|
||||
if [[ $? -ne 0 ]]; then
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
usermod -a -G emby $EMBY_USER
|
||||
else
|
||||
echo "WARNING: The runas user is not part of emby group and you don't have enough privileges to add it. The restart button in the GUI will probably fail."
|
||||
echo "To solve this start the emby-server service using the startup scripts (systemd/sysv) or"
|
||||
echo "add the runas user ($EMBY_USER) to the emby group manually and restart Emby."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Data directory where Emby database, cache and logs are stored
|
||||
PROGRAMDATA=$EMBY_DATA
|
||||
PROGRAMDATA_OPT="-programdata $PROGRAMDATA"
|
||||
|
||||
# Path to store PID file
|
||||
PIDFILE=$EMBY_PIDFILE
|
||||
|
||||
# Full path of Emby binary
|
||||
EMBY_EXEC=$EMBY_BIN
|
||||
|
||||
# Path of emby program files
|
||||
EMBY_PATH=$EMBY_DIR
|
||||
|
||||
# path to mono bin
|
||||
MONO_EXEC=$MONO_BIN
|
||||
|
||||
# umask
|
||||
UMASK=${UMASK:-002}
|
||||
|
||||
# Mono environment variables
|
||||
MAGICK_HOME_ENV="MAGICK_HOME=${EMBY_PATH}"
|
||||
EMBY_LIBRARY_PATH=$(find /usr/lib/emby-server/ -maxdepth 1 -mindepth 1 -type d| grep -v bin | grep -v etc | grep -v -e "/\.")
|
||||
MAGICK_CODER_FILTER_PATH_ENV="MAGICK_CODER_FILTER_PATH=$(find ${EMBY_LIBRARY_PATH} -type d -name "filters" | grep EmbyMagick)"
|
||||
MAGICK_CODER_MODULE_PATH_ENV="MAGICK_CODER_MODULE_PATH=$(find ${EMBY_LIBRARY_PATH} -type d -name "coders" | grep EmbyMagick)"
|
||||
MONO_EXEC_ENV="$MONO_ENV ${EMBY_LIBRARY_PATH:+"LD_LIBRARY_PATH=${EMBY_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"}"
|
||||
|
||||
# Mono options
|
||||
MONO_EXEC_OPTS=$MONO_OPTS
|
||||
|
||||
# restart function
|
||||
RESTART_OPTS="-restartpath ${EMBY_PATH}/restart.sh"
|
||||
|
||||
# Emby options
|
||||
EMBY_OPTS="$PROGRAMDATA_OPT $RESTART_OPTS $EMBY_ADD_OPTS"
|
||||
|
||||
PID_PATH=$(dirname $PIDFILE)
|
||||
|
||||
# Exit if the mono-sgen not installed
|
||||
if [[ ! -x $MONO_EXEC ]]; then
|
||||
if [[ -n "$(command -v mono-sgen)" ]]; then
|
||||
MONO_EXEC=$(command -v mono-sgen)
|
||||
else
|
||||
MONO_EXEC=$(command -v mono)
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create programdata directory if not exist and ensure the emby user can write to it
|
||||
if [[ ! -d $PROGRAMDATA ]]; then
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
mkdir -p $PROGRAMDATA
|
||||
else
|
||||
echo "WARNING: $EMBY_DATA directory does not exist."
|
||||
echo "To solve this, if it is an upgrade verify that \"EMBY_DATA\" is set to the correct path in /etc/emby-server.conf."
|
||||
echo "You may need to locate the path of your library files and set EMBY_DATA to that path."
|
||||
echo "If this is an new installation please rerun last command with elevated permissions."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set right permission for directories
|
||||
DATA_CURRENT_USER=$(ls -lad $PROGRAMDATA | awk '{print $3}')
|
||||
|
||||
if [[ "$DATA_CURRENT_USER" != "$EMBY_USER" ]]; then
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
chown -R $EMBY_USER.$EMBY_GROUP $PROGRAMDATA
|
||||
else
|
||||
echo "WARNING: $EMBY_DATA directory does not have the correct permissions."
|
||||
echo "Please rerun this script with elevated permissions."
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo $$ > $PIDFILE
|
||||
exec su -s /bin/sh -c 'umask $0; exec "$1" "$@"' $EMBY_USER -- \
|
||||
$UMASK env $MAGICK_HOME_ENV $MAGICK_CODER_FILTER_PATH_ENV $MAGICK_CODER_MODULE_PATH_ENV \
|
||||
$MONO_EXEC_ENV $MONO_EXEC $MONO_EXEC_OPTS $EMBY_EXEC $EMBY_OPTS
|
||||
;;
|
||||
clear)
|
||||
[[ -e $PIDFILE ]] && rm -rf $PIDFILE
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|clear}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
@ -0,0 +1,121 @@
|
||||
#!/bin/bash
|
||||
# vim:set ft=sh sw=2 sts=2 st=2 et:
|
||||
# Author: HurricaneHernandez <carlos@techbyte.ca>
|
||||
# Modified for CentOS/Fedora by: FC7 <casasfernando@outlook.com>
|
||||
|
||||
DESC=Jellyfin
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
NAME=jellyfin
|
||||
CONF_FILE=/etc/${NAME}.conf
|
||||
DEFAULT_FILE=/etc/default/${NAME}
|
||||
SCRIPTNAME=/usr/bin/jellyfin
|
||||
|
||||
# Source Jellyfin default configuration
|
||||
. $DEFAULT_FILE
|
||||
|
||||
# Source Jellyfin user configuration overrides
|
||||
if [[ -f $CONF_FILE ]]; then
|
||||
. $CONF_FILE
|
||||
else
|
||||
echo "${CONF_FILE} not found using default settings.";
|
||||
fi
|
||||
|
||||
# Ensure the runas user has restart privilege to restart the service if not try to add the user to jellyfin group. WARN on failure
|
||||
if [[ "$JELLYFIN_USER" != "jellyfin" ]]; then
|
||||
groups $JELLYFIN_USER | grep -q jellyfin
|
||||
if [[ $? -ne 0 ]]; then
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
usermod -a -G jellyfin $JELLYFIN_USER
|
||||
else
|
||||
echo "WARNING: The runas user is not part of jellyfin group and you don't have enough privileges to add it. The restart button in the GUI will probably fail."
|
||||
echo "To solve this start the jellyfin service using the startup scripts (systemd/sysv) or"
|
||||
echo "add the runas user ($JELLYFIN_USER) to the jellyfin group manually and restart Emby."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Data directory where Emby database, cache and logs are stored
|
||||
PROGRAMDATA=$JELLYFIN_DATA
|
||||
PROGRAMDATA_OPT="-programdata $PROGRAMDATA"
|
||||
|
||||
# Path to store PID file
|
||||
PIDFILE=$JELLYFIN_PIDFILE
|
||||
|
||||
# Full path of Emby binary
|
||||
JELLYFIN_EXEC=$JELLYFIN_BIN
|
||||
|
||||
# Path of jellyfin program files
|
||||
JELLYFIN_PATH=$JELLYFIN_DIR
|
||||
|
||||
# path to mono bin
|
||||
MONO_EXEC=$MONO_BIN
|
||||
|
||||
# umask
|
||||
UMASK=${UMASK:-002}
|
||||
|
||||
# Mono environment variables
|
||||
MAGICK_HOME_ENV="MAGICK_HOME=${JELLYFIN_PATH}"
|
||||
JELLYFIN_LIBRARY_PATH=$(find /usr/lib/jellyfin/ -maxdepth 1 -mindepth 1 -type d| grep -v bin | grep -v etc | grep -v -e "/\.")
|
||||
MAGICK_CODER_FILTER_PATH_ENV="MAGICK_CODER_FILTER_PATH=$(find ${JELLYFIN_LIBRARY_PATH} -type d -name "filters" | grep EmbyMagick)"
|
||||
MAGICK_CODER_MODULE_PATH_ENV="MAGICK_CODER_MODULE_PATH=$(find ${JELLYFIN_LIBRARY_PATH} -type d -name "coders" | grep EmbyMagick)"
|
||||
MONO_EXEC_ENV="$MONO_ENV ${JELLYFIN_LIBRARY_PATH:+"LD_LIBRARY_PATH=${JELLYFIN_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"}"
|
||||
|
||||
# Mono options
|
||||
MONO_EXEC_OPTS=$MONO_OPTS
|
||||
|
||||
# restart function
|
||||
RESTART_OPTS="-restartpath ${JELLYFIN_PATH}/restart.sh"
|
||||
|
||||
# Emby options
|
||||
JELLYFIN_OPTS="$PROGRAMDATA_OPT $RESTART_OPTS $JELLYFIN_ADD_OPTS"
|
||||
|
||||
PID_PATH=$(dirname $PIDFILE)
|
||||
|
||||
# Exit if the mono-sgen not installed
|
||||
if [[ ! -x $MONO_EXEC ]]; then
|
||||
if [[ -n "$(command -v mono-sgen)" ]]; then
|
||||
MONO_EXEC=$(command -v mono-sgen)
|
||||
else
|
||||
MONO_EXEC=$(command -v mono)
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create programdata directory if not exist and ensure the jellyfin user can write to it
|
||||
if [[ ! -d $PROGRAMDATA ]]; then
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
mkdir -p $PROGRAMDATA
|
||||
else
|
||||
echo "WARNING: $JELLYFIN_DATA directory does not exist."
|
||||
echo "To solve this, if it is an upgrade verify that \"JELLYFIN_DATA\" is set to the correct path in /etc/jellyfin.conf."
|
||||
echo "You may need to locate the path of your library files and set JELLYFIN_DATA to that path."
|
||||
echo "If this is an new installation please rerun last command with elevated permissions."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set right permission for directories
|
||||
DATA_CURRENT_USER=$(ls -lad $PROGRAMDATA | awk '{print $3}')
|
||||
|
||||
if [[ "$DATA_CURRENT_USER" != "$JELLYFIN_USER" ]]; then
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
chown -R $JELLYFIN_USER.$JELLYFIN_GROUP $PROGRAMDATA
|
||||
else
|
||||
echo "WARNING: $JELLYFIN_DATA directory does not have the correct permissions."
|
||||
echo "Please rerun this script with elevated permissions."
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo $$ > $PIDFILE
|
||||
exec su -s /bin/sh -c 'umask $0; exec "$1" "$@"' $JELLYFIN_USER -- \
|
||||
$UMASK env $MAGICK_HOME_ENV $MAGICK_CODER_FILTER_PATH_ENV $MAGICK_CODER_MODULE_PATH_ENV \
|
||||
$MONO_EXEC_ENV $MONO_EXEC $MONO_EXEC_OPTS $JELLYFIN_EXEC $JELLYFIN_OPTS
|
||||
;;
|
||||
clear)
|
||||
[[ -e $PIDFILE ]] && rm -rf $PIDFILE
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|clear}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
@ -1,37 +0,0 @@
|
||||
#Allow emby group to start, stop and restart itself
|
||||
Cmnd_Alias RESTARTSERVER_SYSV = /sbin/service emby-server restart, /usr/sbin/service emby-server restart
|
||||
Cmnd_Alias STARTSERVER_SYSV = /sbin/service emby-server start, /usr/sbin/service emby-server start
|
||||
Cmnd_Alias STOPSERVER_SYSV = /sbin/service emby-server stop, /usr/sbin/service emby-server stop
|
||||
Cmnd_Alias RESTARTSERVER_SYSTEMD = /usr/bin/systemctl restart emby-server, /bin/systemctl restart emby-server
|
||||
Cmnd_Alias STARTSERVER_SYSTEMD = /usr/bin/systemctl start emby-server, /bin/systemctl start emby-server
|
||||
Cmnd_Alias STOPSERVER_SYSTEMD = /usr/bin/systemctl stop emby-server, /bin/systemctl stop emby-server
|
||||
Cmnd_Alias RESTARTSERVER_INITD = /etc/init.d/emby-server restart
|
||||
Cmnd_Alias STARTSERVER_INITD = /etc/init.d/emby-server start
|
||||
Cmnd_Alias STOPSERVER_INITD = /etc/init.d/emby-server stop
|
||||
|
||||
|
||||
%emby ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSV
|
||||
%emby ALL=(ALL) NOPASSWD: STARTSERVER_SYSV
|
||||
%emby ALL=(ALL) NOPASSWD: STOPSERVER_SYSV
|
||||
%emby ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSTEMD
|
||||
%emby ALL=(ALL) NOPASSWD: STARTSERVER_SYSTEMD
|
||||
%emby ALL=(ALL) NOPASSWD: STOPSERVER_SYSTEMD
|
||||
%emby ALL=(ALL) NOPASSWD: RESTARTSERVER_INITD
|
||||
%emby ALL=(ALL) NOPASSWD: STARTSERVER_INITD
|
||||
%emby 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
|
||||
|
||||
#Allow the server to mount iso images
|
||||
%emby ALL=(ALL) NOPASSWD: /bin/mount
|
||||
%emby ALL=(ALL) NOPASSWD: /bin/umount
|
||||
|
||||
Defaults:%emby !requiretty
|
@ -1,24 +0,0 @@
|
||||
# Override defaults for emby initscript
|
||||
# sourced by /etc/init.d/emby-server and /usr/bin/emby-server
|
||||
# installed at /etc/emby-server.conf by the maintainer scripts
|
||||
|
||||
#
|
||||
# This is a POSIX shell fragment
|
||||
#
|
||||
|
||||
## To change the defaults add any of the following settings below the comments
|
||||
##
|
||||
## EMBY_USER= #$EMBY_USER, username to run Emby under, the default is emby
|
||||
## EMBY_GROUP= #$EMBY_GROUP, Emby server group where Emby user belongs
|
||||
## EMBY_DIR= #$EMBY_DIR, the location of Emby program files the default is /usr/lib/emby-server
|
||||
## EMBY_BIN= #$EMBY_BIN, full path of MediaBrowser.Server.Mono.exe the default is /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe
|
||||
## EMBY_DATA= #$EMBY_DATA, the location of Emby data, cache, logs, the default is /var/lib/emby-server
|
||||
## EMBY_PIDFILE= #$EMBY_PIDFILE, the location of emby.pid, the default is /var/run/emby/emby-server.pid
|
||||
## EMBY_ADD_OPTS= #$EMBY_ADD_OPTS, additional options to pass to the Emby server executable, beyond ffmpeg, ffprobe and restart
|
||||
## MONO_BIN= #$MONO_BIN, full path of mono binary, the default is /usr/bin/mono-sgen
|
||||
## MONO_OPTS= #$MONO_OPTS, list of additional options to pass to mono binary
|
||||
## MONO_ENV= #$MONO_ENV, list of environment variables for running mono binary
|
||||
##
|
||||
## EXAMPLE if want to run as different user
|
||||
## add EMBY_USER=username
|
||||
## otherwise default emby is used
|
@ -1,37 +0,0 @@
|
||||
# Defaults for emby initscript
|
||||
# sourced by /etc/init.d/emby-server and /usr/lib/emby-server/emby-server.sh
|
||||
# installed at /etc/default/emby-server by the maintainer scripts
|
||||
|
||||
#
|
||||
# This is a POSIX shell fragment
|
||||
#
|
||||
|
||||
## Don't edit this file
|
||||
## Edit user configuration in /etc/emby-server.conf to change
|
||||
##
|
||||
## EMBY_USER= #$EMBY_USER, username to run Emby under, the default is emby
|
||||
## EMBY_GROUP= #$EMBY_GROUP, Emby server group where Emby user belongs
|
||||
## EMBY_DIR= #$EMBY_DIR, the location of Emby program files the default is /usr/lib/emby-server
|
||||
## EMBY_BIN= #$EMBY_BIN, full path of MediaBrowser.Server.Mono.exe the default is /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe
|
||||
## EMBY_DATA= #$EMBY_DATA, the location of Emby data, cache, logs, the default is /var/lib/emby-server
|
||||
## EMBY_PIDFILE= #$EMBY_PIDFILE, the location of emby.pid, the default is /var/run/emby/emby-server.pid
|
||||
## EMBY_ADD_OPTS= #$EMBY_ADD_OPTS, additional options to pass to the Emby server executable, beyond ffmpeg, ffprobe and restart
|
||||
## MONO_BIN= #$MONO_BIN, full path of mono binary, the default is /usr/bin/mono-sgen
|
||||
## MONO_OPTS= #$MONO_OPTS, list of additional options to pass to mono binary
|
||||
## MONO_ENV= #$MONO_ENV, list of environment variables for running mono binary
|
||||
##
|
||||
## EXAMPLE if want to run as different user
|
||||
## add EMBY_USER=username to /etc/emby-server.conf
|
||||
## otherwise default emby is used
|
||||
|
||||
EMBY_USER="emby"
|
||||
EMBY_GROUP="emby"
|
||||
EMBY_DIR="/usr/lib/emby-server"
|
||||
EMBY_BIN="/usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe"
|
||||
EMBY_DATA="/var/lib/emby-server"
|
||||
EMBY_PIDFILE="/var/run/emby-server.pid"
|
||||
EMBY_ADD_OPTS=""
|
||||
MONO_BIN="/usr/bin/mono-sgen"
|
||||
MONO_OPTS="--optimize=all"
|
||||
MONO_ENV="MONO_THREADS_PER_CPU=250 MONO_GC_PARAMS=nursery-size=128m"
|
||||
UMASK="002"
|
@ -1,5 +1,5 @@
|
||||
usr/lib/emby-server usr/lib/
|
||||
debian/emby-server.conf etc/
|
||||
debian/emby etc/sudoers.d/
|
||||
debian/bin/emby-server usr/bin/
|
||||
debian/restart.sh usr/lib/emby-server
|
||||
usr/lib/jellyfin usr/lib/
|
||||
debian/jellyfin.conf etc/
|
||||
debian/jellyfin-sudoers etc/sudoers.d/
|
||||
debian/bin/jellyfin usr/bin/
|
||||
debian/restart.sh usr/lib/jellyfin
|
||||
|
@ -0,0 +1,37 @@
|
||||
#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/systemctl restart jellyfin, /bin/systemctl restart jellyfin
|
||||
Cmnd_Alias STARTSERVER_SYSTEMD = /usr/bin/systemctl start jellyfin, /bin/systemctl start jellyfin
|
||||
Cmnd_Alias STOPSERVER_SYSTEMD = /usr/bin/systemctl stop jellyfin, /bin/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
|
||||
|
||||
#Allow the server to mount iso images
|
||||
%jellyfin ALL=(ALL) NOPASSWD: /bin/mount
|
||||
%jellyfin ALL=(ALL) NOPASSWD: /bin/umount
|
||||
|
||||
Defaults:%jellyfin !requiretty
|
@ -0,0 +1,24 @@
|
||||
# Override defaults for jellyfin initscript
|
||||
# sourced by /etc/init.d/jellyfin and /usr/bin/jellyfin
|
||||
# installed at /etc/jellyfin.conf by the maintainer scripts
|
||||
|
||||
#
|
||||
# This is a POSIX shell fragment
|
||||
#
|
||||
|
||||
## To change the defaults add any of the following settings below the comments
|
||||
##
|
||||
## JELLYFIN_USER= #$JELLYFIN_USER, username to run Emby under, the default is jellyfin
|
||||
## JELLYFIN_GROUP= #$JELLYFIN_GROUP, Jellyfin group where Emby user belongs
|
||||
## JELLYFIN_DIR= #$JELLYFIN_DIR, the location of Emby program files the default is /usr/lib/jellyfin
|
||||
## JELLYFIN_BIN= #$JELLYFIN_BIN, full path of MediaBrowser.Server.Mono.exe the default is /usr/lib/jellyfin/bin/MediaBrowser.Server.Mono.exe
|
||||
## JELLYFIN_DATA= #$JELLYFIN_DATA, the location of Emby data, cache, logs, the default is /var/lib/jellyfin
|
||||
## JELLYFIN_PIDFILE= #$JELLYFIN_PIDFILE, the location of jellyfin.pid, the default is /var/run/jellyfin/jellyfin.pid
|
||||
## JELLYFIN_ADD_OPTS= #$JELLYFIN_ADD_OPTS, additional options to pass to the Jellyfin executable, beyond ffmpeg, ffprobe and restart
|
||||
## MONO_BIN= #$MONO_BIN, full path of mono binary, the default is /usr/bin/mono-sgen
|
||||
## MONO_OPTS= #$MONO_OPTS, list of additional options to pass to mono binary
|
||||
## MONO_ENV= #$MONO_ENV, list of environment variables for running mono binary
|
||||
##
|
||||
## EXAMPLE if want to run as different user
|
||||
## add JELLYFIN_USER=username
|
||||
## otherwise default jellyfin is used
|
@ -0,0 +1,37 @@
|
||||
# Defaults for jellyfin initscript
|
||||
# sourced by /etc/init.d/jellyfin and /usr/lib/jellyfin/jellyfin.sh
|
||||
# installed at /etc/default/jellyfin by the maintainer scripts
|
||||
|
||||
#
|
||||
# This is a POSIX shell fragment
|
||||
#
|
||||
|
||||
## Don't edit this file
|
||||
## Edit user configuration in /etc/jellyfin.conf to change
|
||||
##
|
||||
## JELLYFIN_USER= #$JELLYFIN_USER, username to run Emby under, the default is jellyfin
|
||||
## JELLYFIN_GROUP= #$JELLYFIN_GROUP, Jellyfin group where Emby user belongs
|
||||
## JELLYFIN_DIR= #$JELLYFIN_DIR, the location of Emby program files the default is /usr/lib/jellyfin
|
||||
## JELLYFIN_BIN= #$JELLYFIN_BIN, full path of MediaBrowser.Server.Mono.exe the default is /usr/lib/jellyfin/bin/MediaBrowser.Server.Mono.exe
|
||||
## JELLYFIN_DATA= #$JELLYFIN_DATA, the location of Emby data, cache, logs, the default is /var/lib/jellyfin
|
||||
## JELLYFIN_PIDFILE= #$JELLYFIN_PIDFILE, the location of jellyfin.pid, the default is /var/run/jellyfin/jellyfin.pid
|
||||
## JELLYFIN_ADD_OPTS= #$JELLYFIN_ADD_OPTS, additional options to pass to the Jellyfin executable, beyond ffmpeg, ffprobe and restart
|
||||
## MONO_BIN= #$MONO_BIN, full path of mono binary, the default is /usr/bin/mono-sgen
|
||||
## MONO_OPTS= #$MONO_OPTS, list of additional options to pass to mono binary
|
||||
## MONO_ENV= #$MONO_ENV, list of environment variables for running mono binary
|
||||
##
|
||||
## EXAMPLE if want to run as different user
|
||||
## add JELLYFIN_USER=username to /etc/jellyfin.conf
|
||||
## otherwise default jellyfin is used
|
||||
|
||||
JELLYFIN_USER="jellyfin"
|
||||
JELLYFIN_GROUP="jellyfin"
|
||||
JELLYFIN_DIR="/usr/lib/jellyfin"
|
||||
JELLYFIN_BIN="/usr/lib/jellyfin/bin/MediaBrowser.Server.Mono.exe"
|
||||
JELLYFIN_DATA="/var/lib/jellyfin"
|
||||
JELLYFIN_PIDFILE="/var/run/jellyfin.pid"
|
||||
JELLYFIN_ADD_OPTS=""
|
||||
MONO_BIN="/usr/bin/mono-sgen"
|
||||
MONO_OPTS="--optimize=all"
|
||||
MONO_ENV="MONO_THREADS_PER_CPU=250 MONO_GC_PARAMS=nursery-size=128m"
|
||||
UMASK="002"
|
@ -1,12 +1,12 @@
|
||||
[Unit]
|
||||
Description=Emby Media Server
|
||||
Description=Jellyfin Media Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/emby-server start
|
||||
ExecStart=/usr/bin/jellyfin start
|
||||
Restart=on-abort
|
||||
TimeoutSec=20
|
||||
ExecStopPost=/usr/bin/emby-server clear
|
||||
ExecStopPost=/usr/bin/jellyfin clear
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,3 +1,3 @@
|
||||
# This is an override for the following lintian errors:
|
||||
emby-server source: license-problem-md5sum-non-free-file Emby.Drawing/ImageMagick/fonts/webdings.ttf*
|
||||
emby-server source: source-is-missing
|
||||
jellyfin source: license-problem-md5sum-non-free-file Emby.Drawing/ImageMagick/fonts/webdings.ttf*
|
||||
jellyfin source: source-is-missing
|
||||
|
Loading…
Reference in new issue