test
This commit is contained in:
parent
411b58340c
commit
ee27adad4f
@ -1,16 +1,33 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
script_delegation ()
|
||||||
|
{
|
||||||
|
if [ -f "$1" ] ; then
|
||||||
|
if [ "$1" == "token" ]
|
||||||
|
then
|
||||||
|
source plex-token.sh
|
||||||
|
else
|
||||||
|
echo "'$1' is not a valid plex-tools command"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# ChuckPa already wrote a great function for getting host info
|
# ChuckPa already wrote a great function for getting host info
|
||||||
source ./HostConfig.sh
|
source ./HostConfig.sh
|
||||||
HostConfig
|
|
||||||
echo "$AppSuppDir"
|
|
||||||
|
|
||||||
PLEX_PREFERENCES_XML="/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Preferences.xml"
|
echo "Getting Host Information"
|
||||||
echo "$PLEX_PREFERENCES_XML"
|
HostConfig
|
||||||
|
|
||||||
PLEX_PREFERENCES_XML="$AppSuppDir/Plex Media Server/Preferences.xml"
|
PLEX_PREFERENCES_XML="$AppSuppDir/Plex Media Server/Preferences.xml"
|
||||||
echo "$PLEX_PREFERENCES_XML"
|
if [[ -f "$PLEX_PREFERENCES_XML" ]]; then
|
||||||
# get token
|
echo "Plex Preferences.xml found: $PLEX_PREFERENCES_XML"
|
||||||
#LOCAL_PLEX_TOKEN=`cat "${PLEX_PREFERENCES_XML}" | sed -e 's;^.* PlexOnlineToken=";;' | sed -e 's;".*$;;' | tail -1`
|
# get token
|
||||||
|
LOCAL_PLEX_TOKEN=`cat "${PLEX_PREFERENCES_XML}" | sed -e 's;^.* PlexOnlineToken=";;' | sed -e 's;".*$;;' | tail -1`
|
||||||
|
|
||||||
#echo "Local Token found in $PLEX_PREFERENCES_XML: $LOCAL_PLEX_TOKEN"
|
echo "Local Token found in $PLEX_PREFERENCES_XML: $LOCAL_PLEX_TOKEN"
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Plex Preferences.xml not found"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user