Skip to content

Commit 4fdc48e

Browse files
committed
Added sed command for token
1 parent dc54d7a commit 4fdc48e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

init/30_update_plex.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ INSTALLED=$(dpkg-query -W -f='${Version}' plexmediaserver)
1212

1313

1414
#Get stuff from things.
15-
PLEX_TOKEN=$()
15+
PLEX_TOKEN=$(cat /config/Library/Application Support/Plex Media Server/Preferences.xml | sed -n 's/.*PlexOnlineToken="//p' | sed "s/\".*//")
1616
[ -z PLEX_TOKEN ] && echo "Plex token not avalible, please login " && exit 0
1717
PLEX_LATEST=$(curl -s "https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 )
1818

0 commit comments

Comments
 (0)