mirror of
https://github.com/ChuckPa/PlexDBRepair.git
synced 2026-07-30 18:43:52 -05:00
v 1.16.00
Add mutli-location support for PlexMediaServer.app on MacOS Add Buttons for Coffee donations.
This commit is contained in:
+37
-26
@@ -701,38 +701,49 @@ HostConfig() {
|
||||
HostType="ASUSTOR"
|
||||
return 0
|
||||
|
||||
|
||||
# Apple Mac
|
||||
elif [ -d "/Applications/Plex Media Server.app" ] && \
|
||||
[ -d "$HOME/Library/Application Support/Plex Media Server" ]; then
|
||||
elif [ "$(uname)" = "Darwin" ] && [ -d "$HOME/Library/Application Support/Plex Media Server" ]; then
|
||||
|
||||
# Where is the software
|
||||
PLEX_SQLITE="/Applications/Plex Media Server.app/Contents/MacOS/Plex SQLite"
|
||||
AppSuppDir="$HOME/Library/Application Support"
|
||||
DBDIR="$AppSuppDir/Plex Media Server/Plug-in Support/Databases"
|
||||
CACHEDIR="$HOME/Library/Caches/PlexMediaServer/PhotoTranscoder"
|
||||
LOGFILE="$DBDIR/DBRepair.log"
|
||||
LOG_TOOL="logger"
|
||||
TMPDIR="/tmp"
|
||||
SYSTMP="$TMPDIR"
|
||||
# Determine where the application bundle is installed
|
||||
if [ -d "/Applications/Plex Media Server.app" ]; then
|
||||
PkgDir="/Applications/Plex Media Server.app"
|
||||
elif [ -d "$HOME/Applications/Plex Media Server.app" ]; then
|
||||
PkgDir="$HOME/Applications/Plex Media Server.app"
|
||||
else
|
||||
# It is a Mac, but the .app bundle cannot be found
|
||||
PkgDir=""
|
||||
fi
|
||||
|
||||
# MacOS uses pgrep and uses different stat options
|
||||
PIDOF="pgrep"
|
||||
STATFMT="-f"
|
||||
STATBYTES="%z"
|
||||
STATPERMS="%A"
|
||||
# Only proceed if we successfully located PkgDir
|
||||
if [ -n "$PkgDir" ]; then
|
||||
# Where is the software
|
||||
PLEX_SQLITE="${PkgDir}/Contents/MacOS/Plex SQLite"
|
||||
AppSuppDir="$HOME/Library/Application Support"
|
||||
DBDIR="$AppSuppDir/Plex Media Server/Plug-in Support/Databases"
|
||||
CACHEDIR="$HOME/Library/Caches/PlexMediaServer/PhotoTranscoder"
|
||||
LOGFILE="$DBDIR/DBRepair.log"
|
||||
LOG_TOOL="logger"
|
||||
TMPDIR="/tmp"
|
||||
SYSTMP="$TMPDIR"
|
||||
|
||||
# Root not required on MacOS. PMS runs as username.
|
||||
RootRequired=0
|
||||
# MacOS uses pgrep and uses different stat options
|
||||
PIDOF="pgrep"
|
||||
STATFMT="-f"
|
||||
STATBYTES="%z"
|
||||
STATPERMS="%A"
|
||||
|
||||
# You can set haptic to 0 for silence.
|
||||
HaveStartStop=1
|
||||
StartCommand=startMacPMS
|
||||
StopCommand=stopMacPMS
|
||||
HapticOkay=1
|
||||
# Root not required on MacOS. PMS runs as username.
|
||||
RootRequired=0
|
||||
|
||||
HostType="Mac"
|
||||
return 0
|
||||
# You can set haptic to 0 for silence.
|
||||
HaveStartStop=1
|
||||
StartCommand=startMacPMS
|
||||
StopCommand=stopMacPMS
|
||||
HapticOkay=1
|
||||
|
||||
HostType="Mac"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# FreeBSD 14+
|
||||
elif [ -e /etc/os-release ] && [ "$(cat /etc/os-release | grep FreeBSD)" != "" ]; then
|
||||
|
||||
Reference in New Issue
Block a user