mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
Merge pull request #783 from joshuaboniface/use-cache-flag
Update builds to use #749 and #756
This commit is contained in:
commit
34da7de47d
11 changed files with 46 additions and 26 deletions
|
@ -1,4 +1,5 @@
|
||||||
# Jellyfin default configuration options
|
# Jellyfin default configuration options
|
||||||
|
# This is a POSIX shell fragment
|
||||||
|
|
||||||
# Use this file to override the default configurations; add additional
|
# Use this file to override the default configurations; add additional
|
||||||
# options with JELLYFIN_ADD_OPTS.
|
# options with JELLYFIN_ADD_OPTS.
|
||||||
|
@ -7,10 +8,6 @@
|
||||||
# /etc/systemd/system/jellyfin.service.d/jellyfin.service.conf
|
# /etc/systemd/system/jellyfin.service.d/jellyfin.service.conf
|
||||||
# to override the user or this config file's location.
|
# to override the user or this config file's location.
|
||||||
|
|
||||||
#
|
|
||||||
# This is a POSIX shell fragment
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# General options
|
# General options
|
||||||
#
|
#
|
||||||
|
@ -19,10 +16,16 @@
|
||||||
JELLYFIN_DATA_DIRECTORY="/var/lib/jellyfin"
|
JELLYFIN_DATA_DIRECTORY="/var/lib/jellyfin"
|
||||||
JELLYFIN_CONFIG_DIRECTORY="/etc/jellyfin"
|
JELLYFIN_CONFIG_DIRECTORY="/etc/jellyfin"
|
||||||
JELLYFIN_LOG_DIRECTORY="/var/log/jellyfin"
|
JELLYFIN_LOG_DIRECTORY="/var/log/jellyfin"
|
||||||
|
JELLYFIN_CACHE_DIRECTORY="/var/cache/jellyfin"
|
||||||
|
|
||||||
# Restart script for in-app server control
|
# Restart script for in-app server control
|
||||||
JELLYFIN_RESTART_SCRIPT="/usr/lib/jellyfin/restart.sh"
|
JELLYFIN_RESTART_OPT="--restartpath /usr/lib/jellyfin/restart.sh"
|
||||||
# Additional options for the binary
|
|
||||||
JELLYFIN_ADD_OPTS=""
|
# [OPTIONAL] ffmpeg binary paths
|
||||||
|
#JELLYFIN_FFMPEG_OPTS="--ffmpeg /usr/bin/ffmpeg --ffprobe /usr/bin/ffprobe"
|
||||||
|
|
||||||
|
# [OPTIONAL] Additional user-defined options for the binary
|
||||||
|
#JELLYFIN_ADD_OPTS=""
|
||||||
|
|
||||||
#
|
#
|
||||||
# SysV init/Upstart options
|
# SysV init/Upstart options
|
||||||
|
@ -31,4 +34,4 @@ JELLYFIN_ADD_OPTS=""
|
||||||
# Application username
|
# Application username
|
||||||
JELLYFIN_USER="jellyfin"
|
JELLYFIN_USER="jellyfin"
|
||||||
# Full application command
|
# Full application command
|
||||||
JELLYFIN_ARGS="-programdata $JELLYFIN_DATA_DIRECTORY -configdir $JELLYFIN_CONFIG_DIRECTORY -logdir $JELLYFIN_LOG_DIRECTORY -restartpath $JELLYFIN_RESTART_SCRIPT $JELLYFIN_ADD_OPTS"
|
JELLYFIN_ARGS="--datadir $JELLYFIN_DATA_DIRECTORY --configdir $JELLYFIN_CONFIG_DIRECTORY --logdir $JELLYFIN_LOG_DIRECTORY --cachedir $JELLYFIN_CACHE_DIRECTORY $JELLYFIN_RESTART_OPT $JELLYFIN_FFMPEG_OPTS $JELLYFIN_ADD_OPTS"
|
||||||
|
|
|
@ -2,5 +2,5 @@ usr/lib/jellyfin usr/lib/
|
||||||
debian/conf/jellyfin etc/default/
|
debian/conf/jellyfin etc/default/
|
||||||
debian/conf/logging.json etc/jellyfin/
|
debian/conf/logging.json etc/jellyfin/
|
||||||
debian/conf/jellyfin.service.conf etc/systemd/system/jellyfin.service.d/
|
debian/conf/jellyfin.service.conf etc/systemd/system/jellyfin.service.d/
|
||||||
debian/bin/jellyfin-sudoers etc/sudoers.d/
|
debian/conf/jellyfin-sudoers etc/sudoers.d/
|
||||||
debian/bin/restart.sh usr/lib/jellyfin/
|
debian/bin/restart.sh usr/lib/jellyfin/
|
||||||
|
|
|
@ -6,7 +6,7 @@ After = network.target
|
||||||
Type = simple
|
Type = simple
|
||||||
EnvironmentFile = /etc/default/jellyfin
|
EnvironmentFile = /etc/default/jellyfin
|
||||||
User = jellyfin
|
User = jellyfin
|
||||||
ExecStart = /usr/bin/jellyfin -programdata ${JELLYFIN_DATA_DIRECTORY} -configdir ${JELLYFIN_CONFIG_DIRECTORY} -logdir ${JELLYFIN_LOG_DIRECTORY} -restartpath ${JELLYFIN_RESTART_SCRIPT} ${JELLYFIN_ADD_OPTS}
|
ExecStart = /usr/bin/jellyfin --datadir ${JELLYFIN_DATA_DIRECTORY} --configdir ${JELLYFIN_CONFIG_DIRECTORY} --logdir ${JELLYFIN_LOG_DIRECTORY} --cachedir ${JELLYFIN_CACHE_DIRECTORY} ${JELLYFIN_RESTART_OPT} ${JELLYFIN_FFMPEG_OPTS} ${JELLYFIN_ADD_OPTS}
|
||||||
Restart = on-failure
|
Restart = on-failure
|
||||||
TimeoutSec = 15
|
TimeoutSec = 15
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ fi
|
||||||
PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME}
|
PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME}
|
||||||
CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME}
|
CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME}
|
||||||
LOGDATA=${JELLYFIN_LOG_DIRECTORY-/var/log/$NAME}
|
LOGDATA=${JELLYFIN_LOG_DIRECTORY-/var/log/$NAME}
|
||||||
|
CACHEDATA=${JELLYFIN_CACHE_DIRECTORY-/var/cache/$NAME}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
configure)
|
configure)
|
||||||
|
@ -37,10 +38,14 @@ case "$1" in
|
||||||
if [[ ! -d $LOGDATA ]]; then
|
if [[ ! -d $LOGDATA ]]; then
|
||||||
mkdir $LOGDATA
|
mkdir $LOGDATA
|
||||||
fi
|
fi
|
||||||
|
# ensure $CACHEDATA exists
|
||||||
|
if [[ ! -d $CACHEDATA ]]; then
|
||||||
|
mkdir $CACHEDATA
|
||||||
|
fi
|
||||||
# Ensure permissions are correct on all config directories
|
# Ensure permissions are correct on all config directories
|
||||||
chown -R jellyfin:jellyfin $PROGRAMDATA
|
chown -R jellyfin $PROGRAMDATA $CONFIGDATA $LOGDATA $CACHEDATA
|
||||||
chown -R jellyfin:jellyfin $CONFIGDATA
|
chgrp adm $PROGRAMDATA $CONFIGDATA $LOGDATA $CACHEDATA
|
||||||
chown -R jellyfin:jellyfin $LOGDATA
|
chmod 0750 $PROGRAMDATA $CONFIGDATA $LOGDATA $CACHEDATA
|
||||||
|
|
||||||
chmod +x /usr/lib/jellyfin/restart.sh > /dev/null 2>&1 || true
|
chmod +x /usr/lib/jellyfin/restart.sh > /dev/null 2>&1 || true
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,8 @@ fi
|
||||||
# Data directories for program data (cache, db), configs, and logs
|
# Data directories for program data (cache, db), configs, and logs
|
||||||
PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME}
|
PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME}
|
||||||
CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME}
|
CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME}
|
||||||
LOGDATA=${JELLYFIN_DATA_DIRECTORY-/var/log/$NAME}
|
LOGDATA=${JELLYFIN_LOG_DIRECTORY-/var/log/$NAME}
|
||||||
|
CACHEDATA=${JELLYFIN_CACHE_DIRECTORY-/var/cache/$NAME}
|
||||||
|
|
||||||
# In case this system is running systemd, we make systemd reload the unit files
|
# In case this system is running systemd, we make systemd reload the unit files
|
||||||
# to pick up changes.
|
# to pick up changes.
|
||||||
|
@ -44,6 +45,10 @@ case "$1" in
|
||||||
if [[ -d $LOGDATA ]]; then
|
if [[ -d $LOGDATA ]]; then
|
||||||
rm -rf $LOGDATA
|
rm -rf $LOGDATA
|
||||||
fi
|
fi
|
||||||
|
# Remove cache dir
|
||||||
|
if [[ -d $CACHEDATA ]]; then
|
||||||
|
rm -rf $CACHEDATA
|
||||||
|
fi
|
||||||
# Remove program data dir
|
# Remove program data dir
|
||||||
if [[ -d $PROGRAMDATA ]]; then
|
if [[ -d $PROGRAMDATA ]]; then
|
||||||
rm -rf $PROGRAMDATA
|
rm -rf $PROGRAMDATA
|
||||||
|
@ -55,6 +60,7 @@ case "$1" in
|
||||||
# Remove anything at the default locations; catches situations where the user moved the defaults
|
# Remove anything at the default locations; catches situations where the user moved the defaults
|
||||||
[[ -e /etc/jellyfin ]] && rm -rf /etc/jellyfin
|
[[ -e /etc/jellyfin ]] && rm -rf /etc/jellyfin
|
||||||
[[ -e /var/log/jellyfin ]] && rm -rf /var/log/jellyfin
|
[[ -e /var/log/jellyfin ]] && rm -rf /var/log/jellyfin
|
||||||
|
[[ -e /var/cache/jellyfin ]] && rm -rf /var/cache/jellyfin
|
||||||
[[ -e /var/lib/jellyfin ]] && rm -rf /var/lib/jellyfin
|
[[ -e /var/lib/jellyfin ]] && rm -rf /var/lib/jellyfin
|
||||||
;;
|
;;
|
||||||
remove)
|
remove)
|
||||||
|
|
|
@ -12,7 +12,8 @@ fi
|
||||||
# Data directories for program data (cache, db), configs, and logs
|
# Data directories for program data (cache, db), configs, and logs
|
||||||
PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME}
|
PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME}
|
||||||
CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME}
|
CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME}
|
||||||
LOGDATA=${JELLYFIN_DATA_DIRECTORY-/var/log/$NAME}
|
LOGDATA=${JELLYFIN_LOG_DIRECTORY-/var/log/$NAME}
|
||||||
|
CACHEDATA=${JELLYFIN_CACHE_DIRECTORY-/var/cache/$NAME}
|
||||||
|
|
||||||
# In case this system is running systemd, we make systemd reload the unit files
|
# In case this system is running systemd, we make systemd reload the unit files
|
||||||
# to pick up changes.
|
# to pick up changes.
|
||||||
|
@ -53,13 +54,16 @@ case "$1" in
|
||||||
# Clean up old Emby cruft that can break the user's system
|
# Clean up old Emby cruft that can break the user's system
|
||||||
[[ -f /etc/sudoers.d/emby ]] && rm -f /etc/sudoers.d/emby
|
[[ -f /etc/sudoers.d/emby ]] && rm -f /etc/sudoers.d/emby
|
||||||
|
|
||||||
# If we have existing config or log dirs in /var/lib/jellyfin, move them into the right place
|
# If we have existing config, log, or cache dirs in /var/lib/jellyfin, move them into the right place
|
||||||
if [[ -d $PROGRAMDATA/config ]]; then
|
if [[ -d $PROGRAMDATA/config ]]; then
|
||||||
mv $PROGRAMDATA/config $CONFIGDATA
|
mv $PROGRAMDATA/config $CONFIGDATA
|
||||||
fi
|
fi
|
||||||
if [[ -d $PROGRAMDATA/logs ]]; then
|
if [[ -d $PROGRAMDATA/logs ]]; then
|
||||||
mv $PROGRAMDATA/logs $LOGDATA
|
mv $PROGRAMDATA/logs $LOGDATA
|
||||||
fi
|
fi
|
||||||
|
if [[ -d $PROGRAMDATA/logs ]]; then
|
||||||
|
mv $PROGRAMDATA/cache $CACHEDATA
|
||||||
|
fi
|
||||||
|
|
||||||
;;
|
;;
|
||||||
abort-upgrade)
|
abort-upgrade)
|
||||||
|
|
|
@ -12,7 +12,8 @@ fi
|
||||||
# Data directories for program data (cache, db), configs, and logs
|
# Data directories for program data (cache, db), configs, and logs
|
||||||
PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME}
|
PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME}
|
||||||
CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME}
|
CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME}
|
||||||
LOGDATA=${JELLYFIN_DATA_DIRECTORY-/var/log/$NAME}
|
LOGDATA=${JELLYFIN_LOG_DIRECTORY-/var/log/$NAME}
|
||||||
|
CACHEDATA=${JELLYFIN_CACHE_DIRECTORY-/var/cache/$NAME}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
remove|upgrade|deconfigure)
|
remove|upgrade|deconfigure)
|
||||||
|
|
|
@ -15,13 +15,14 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Tell jellyfin wich ffmpeg/ffprobe to use
|
# Tell jellyfin wich ffmpeg/ffprobe to use
|
||||||
# JELLYFIN_FFMPEG="-ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe"
|
# JELLYFIN_FFMPEG="--ffmpeg /usr/bin/ffmpeg --ffprobe /usr/bin/ffprobe"
|
||||||
|
|
||||||
# Program directories
|
# Program directories
|
||||||
JELLYFIN_DATA_DIRECTORY="/var/lib/jellyfin"
|
JELLYFIN_DATA_DIRECTORY="/var/lib/jellyfin"
|
||||||
JELLYFIN_CONFIG_DIRECTORY="/etc/jellyfin"
|
JELLYFIN_CONFIG_DIRECTORY="/etc/jellyfin"
|
||||||
JELLYFIN_LOG_DIRECTORY="/var/log/jellyfin"
|
JELLYFIN_LOG_DIRECTORY="/var/log/jellyfin"
|
||||||
|
JELLYFIN_CACHE_DIRECTORY="/var/log/jellyfin"
|
||||||
# In-App service control
|
# In-App service control
|
||||||
JELLYFIN_RESTART_OPT="-restartpath /usr/libexec/jellyfin/restart.sh"
|
JELLYFIN_RESTART_OPT="--restartpath /usr/libexec/jellyfin/restart.sh"
|
||||||
# Additional options for the binary
|
# Additional options for the binary
|
||||||
JELLYFIN_ADD_OPTS=""
|
JELLYFIN_ADD_OPTS=""
|
||||||
|
|
|
@ -5,7 +5,7 @@ Description=Jellyfin is a free software media system that puts you in control of
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=/etc/sysconfig/jellyfin
|
EnvironmentFile=/etc/sysconfig/jellyfin
|
||||||
WorkingDirectory=/var/lib/jellyfin
|
WorkingDirectory=/var/lib/jellyfin
|
||||||
ExecStart=/usr/bin/jellyfin -programdata ${JELLYFIN_DATA_DIRECTORY} -configdir ${JELLYFIN_CONFIG_DIRECTORY} -logdir ${JELLYFIN_LOG_DIRECTORY} ${JELLYFIN_RESTART_OPT} ${JELLYFIN_ADD_OPTS} ${JELLYFIN_FFMPEG}
|
ExecStart=/usr/bin/jellyfin --datadir ${JELLYFIN_DATA_DIRECTORY} --configdir ${JELLYFIN_CONFIG_DIRECTORY} --logdir ${JELLYFIN_LOG_DIRECTORY} --cachedir ${JELLYFIN_CACHE_DIRECTORY} ${JELLYFIN_RESTART_OPT} ${JELLYFIN_ADD_OPTS} ${JELLYFIN_FFMPEG}
|
||||||
TimeoutSec=15
|
TimeoutSec=15
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
User=jellyfin
|
User=jellyfin
|
||||||
|
|
|
@ -93,12 +93,12 @@ if($Quiet.IsPresent -or $Quiet -eq $true){
|
||||||
Copy-Item -Path $PSScriptRoot/* -DestinationPath "$Script:DefaultJellyfinInstallDirectory/" -Force -Recurse
|
Copy-Item -Path $PSScriptRoot/* -DestinationPath "$Script:DefaultJellyfinInstallDirectory/" -Force -Recurse
|
||||||
if($Script:InstallAsService){
|
if($Script:InstallAsService){
|
||||||
if($Script:InstallServiceAsUser){
|
if($Script:InstallServiceAsUser){
|
||||||
&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" install Jellyfin `"$Script:DefaultJellyfinInstallDirectory\jellyfin.exe`" -programdata `"$Script:JellyfinDataDir`"
|
&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" install Jellyfin `"$Script:DefaultJellyfinInstallDirectory\jellyfin.exe`" --datadir `"$Script:JellyfinDataDir`"
|
||||||
Start-Sleep -Milliseconds 500
|
Start-Sleep -Milliseconds 500
|
||||||
&sc.exe config Jellyfin obj=".\$($Script:UserCredentials.UserName)" password="$($Script:UserCredentials.GetNetworkCredential().Password)"
|
&sc.exe config Jellyfin obj=".\$($Script:UserCredentials.UserName)" password="$($Script:UserCredentials.GetNetworkCredential().Password)"
|
||||||
&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" set Jellyfin Start SERVICE_DELAYED_AUTO_START
|
&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" set Jellyfin Start SERVICE_DELAYED_AUTO_START
|
||||||
}else{
|
}else{
|
||||||
&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" install Jellyfin `"$Script:DefaultJellyfinInstallDirectory\jellyfin.exe`" -programdata `"$Script:JellyfinDataDir`"
|
&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" install Jellyfin `"$Script:DefaultJellyfinInstallDirectory\jellyfin.exe`" --datadir `"$Script:JellyfinDataDir`"
|
||||||
Start-Sleep -Milliseconds 500
|
Start-Sleep -Milliseconds 500
|
||||||
#&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" set Jellyfin ObjectName $Script:UserCredentials.UserName $Script:UserCredentials.GetNetworkCredential().Password
|
#&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" set Jellyfin ObjectName $Script:UserCredentials.UserName $Script:UserCredentials.GetNetworkCredential().Password
|
||||||
#Set-Service -Name Jellyfin -Credential $Script:UserCredentials
|
#Set-Service -Name Jellyfin -Credential $Script:UserCredentials
|
||||||
|
@ -171,13 +171,13 @@ function InstallJellyfin {
|
||||||
if($Script:InstallAsService){
|
if($Script:InstallAsService){
|
||||||
if($Script:InstallServiceAsUser){
|
if($Script:InstallServiceAsUser){
|
||||||
Write-Host "Installing Service as user $($Script:UserCredentials.UserName)"
|
Write-Host "Installing Service as user $($Script:UserCredentials.UserName)"
|
||||||
&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" install Jellyfin `"$Script:DefaultJellyfinInstallDirectory\jellyfin.exe`" -programdata `"$Script:JellyfinDataDir`"
|
&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" install Jellyfin `"$Script:DefaultJellyfinInstallDirectory\jellyfin.exe`" --datadir `"$Script:JellyfinDataDir`"
|
||||||
Start-Sleep -Milliseconds 2000
|
Start-Sleep -Milliseconds 2000
|
||||||
&sc.exe config Jellyfin obj=".\$($Script:UserCredentials.UserName)" password="$($Script:UserCredentials.GetNetworkCredential().Password)"
|
&sc.exe config Jellyfin obj=".\$($Script:UserCredentials.UserName)" password="$($Script:UserCredentials.GetNetworkCredential().Password)"
|
||||||
&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" set Jellyfin Start SERVICE_DELAYED_AUTO_START
|
&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" set Jellyfin Start SERVICE_DELAYED_AUTO_START
|
||||||
}else{
|
}else{
|
||||||
Write-Host "Installing Service as LocalSystem"
|
Write-Host "Installing Service as LocalSystem"
|
||||||
&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" install Jellyfin `"$Script:DefaultJellyfinInstallDirectory\jellyfin.exe`" -programdata `"$Script:JellyfinDataDir`"
|
&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" install Jellyfin `"$Script:DefaultJellyfinInstallDirectory\jellyfin.exe`" --datadir `"$Script:JellyfinDataDir`"
|
||||||
Start-Sleep -Milliseconds 2000
|
Start-Sleep -Milliseconds 2000
|
||||||
&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" set Jellyfin Start SERVICE_DELAYED_AUTO_START
|
&"$Script:DefaultJellyfinInstallDirectory\nssm.exe" set Jellyfin Start SERVICE_DELAYED_AUTO_START
|
||||||
}
|
}
|
||||||
|
@ -457,4 +457,4 @@ $StartProgramCheck.Add_CheckedChanged({StartJellyFinBoxCheckChanged})
|
||||||
#endregion GUI }
|
#endregion GUI }
|
||||||
|
|
||||||
|
|
||||||
[void]$InstallForm.ShowDialog()
|
[void]$InstallForm.ShowDialog()
|
||||||
|
|
Loading…
Reference in a new issue