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:
Chuck 2023-06-10 12:05:51 -04:00 committed by GitHub
commit 77415c7580
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -624,12 +624,14 @@ HostConfig() {
fi fi
# Last chance to identify this host
elif [ -e /etc/os-release ]; then
# Arch Linux (must check for native Arch after binhex) # Arch Linux (must check for native Arch after binhex)
elif [ -e /etc/os-release ] && [ "$(grep 'Arch Linux' /etc/os-release)" != "" ] && \ 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 # Where is the software
PKGDIR="/usr/lib/plexmediaserver" PKGDIR="/usr/lib/plexmediaserver"
PLEX_SQLITE="$PKGDIR/Plex SQLite" PLEX_SQLITE="$PKGDIR/Plex SQLite"
@ -656,13 +658,13 @@ HostConfig() {
DBDIR="$AppSuppDir/Plex Media Server/Plug-in Support/Databases" DBDIR="$AppSuppDir/Plex Media Server/Plug-in Support/Databases"
LOGFILE="$DBDIR/DBRepair.log" LOGFILE="$DBDIR/DBRepair.log"
LOG_TOOL="logger" LOG_TOOL="logger"
HostType="Arch Linux" HostType="$(grep PRETTY_NAME /etc/os-release | sed -e 's/^.*="//' | tr -d \" )"
HaveStartStop=1 HaveStartStop=1
StartCommand="systemctl start plexmediaserver" StartCommand="systemctl start plexmediaserver"
StopCommand="systemctl stop plexmediaserver" StopCommand="systemctl stop plexmediaserver"
return 0 return 0
fi
fi fi