mirror of
https://github.com/ChuckPa/PlexDBRepair.git
synced 2025-11-06 03:08:55 -05:00
Merge pull request #81 from ChuckPa/chuckpa/arch-linux-refinement
Refine Arch Linux detection. Grab a few others in the process
This commit is contained in:
commit
77415c7580
60
DBRepair.sh
60
DBRepair.sh
@ -624,45 +624,47 @@ HostConfig() {
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Arch Linux (must check for native Arch after binhex)
|
# Last chance to identify this host
|
||||||
elif [ -e /etc/os-release ] && [ "$(grep 'Arch Linux' /etc/os-release)" != "" ] && \
|
elif [ -e /etc/os-release ]; then
|
||||||
|
|
||||||
|
# Arch Linux (must check for native Arch after binhex)
|
||||||
|
if [ "$(grep -E '=arch|="arch"' /etc/os-release)" != "" ] && \
|
||||||
[ -d /usr/lib/plexmediaserver ] && \
|
[ -d /usr/lib/plexmediaserver ] && \
|
||||||
[ -d /var/lib/plex ]; then
|
[ -d /var/lib/plex ]; then
|
||||||
|
|
||||||
|
# Where is the software
|
||||||
|
PKGDIR="/usr/lib/plexmediaserver"
|
||||||
|
PLEX_SQLITE="$PKGDIR/Plex SQLite"
|
||||||
|
LOG_TOOL="logger"
|
||||||
|
|
||||||
# Where is the software
|
# Where is the data
|
||||||
PKGDIR="/usr/lib/plexmediaserver"
|
AppSuppDir="/var/lib/plex"
|
||||||
PLEX_SQLITE="$PKGDIR/Plex SQLite"
|
|
||||||
LOG_TOOL="logger"
|
|
||||||
|
|
||||||
# Where is the data
|
# Find the metadata dir if customized
|
||||||
AppSuppDir="/var/lib/plex"
|
if [ -e /etc/systemd/system/plexmediaserver.service.d ]; then
|
||||||
|
|
||||||
# Find the metadata dir if customized
|
# Get custom AppSuppDir if specified
|
||||||
if [ -e /etc/systemd/system/plexmediaserver.service.d ]; then
|
NewSuppDir="$(GetOverride PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR)"
|
||||||
|
|
||||||
# Get custom AppSuppDir if specified
|
if [ "$NewSuppDir" != "" ]; then
|
||||||
NewSuppDir="$(GetOverride PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR)"
|
if [ -d "$NewSuppDir" ]; then
|
||||||
|
AppSuppDir="$NewSuppDir"
|
||||||
if [ "$NewSuppDir" != "" ]; then
|
else
|
||||||
if [ -d "$NewSuppDir" ]; then
|
Output "Given application support directory override specified does not exist: '$NewSuppDir'. Ignoring."
|
||||||
AppSuppDir="$NewSuppDir"
|
fi
|
||||||
else
|
|
||||||
Output "Given application support directory override specified does not exist: '$NewSuppDir'. Ignoring."
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
DBDIR="$AppSuppDir/Plex Media Server/Plug-in Support/Databases"
|
||||||
|
LOGFILE="$DBDIR/DBRepair.log"
|
||||||
|
LOG_TOOL="logger"
|
||||||
|
HostType="$(grep PRETTY_NAME /etc/os-release | sed -e 's/^.*="//' | tr -d \" )"
|
||||||
|
|
||||||
|
HaveStartStop=1
|
||||||
|
StartCommand="systemctl start plexmediaserver"
|
||||||
|
StopCommand="systemctl stop plexmediaserver"
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DBDIR="$AppSuppDir/Plex Media Server/Plug-in Support/Databases"
|
|
||||||
LOGFILE="$DBDIR/DBRepair.log"
|
|
||||||
LOG_TOOL="logger"
|
|
||||||
HostType="Arch Linux"
|
|
||||||
|
|
||||||
HaveStartStop=1
|
|
||||||
StartCommand="systemctl start plexmediaserver"
|
|
||||||
StopCommand="systemctl stop plexmediaserver"
|
|
||||||
return 0
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user