Add cachedir to deployment scripts; fix bad logdir
This commit is contained in:
parent
ae24d644db
commit
f6227e99cc
|
@ -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,15 @@ 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:jellyfin $PROGRAMDATA
|
||||||
chown -R jellyfin:jellyfin $CONFIGDATA
|
chown -R jellyfin:jellyfin $CONFIGDATA
|
||||||
chown -R jellyfin:jellyfin $LOGDATA
|
chown -R jellyfin:jellyfin $LOGDATA
|
||||||
|
chown -R jellyfin:jellyfin $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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user