From a6823e337e7251e3bd182e42a785c3d50b23d795 Mon Sep 17 00:00:00 2001 From: Stian Buch Larsen Date: Wed, 30 Mar 2016 10:58:28 +0200 Subject: [PATCH] Quoting the path to plex prefs. --- init/30_update_plex.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/30_update_plex.sh b/init/30_update_plex.sh index afa09ce..e51a6b3 100644 --- a/init/30_update_plex.sh +++ b/init/30_update_plex.sh @@ -12,7 +12,7 @@ INSTALLED=$(dpkg-query -W -f='${Version}' plexmediaserver) #Get stuff from things. -PLEX_TOKEN=$(cat /config/Library/Application Support/Plex Media Server/Preferences.xml | sed -n 's/.*PlexOnlineToken="//p' | sed "s/\".*//") +PLEX_TOKEN=$(cat "/config/Library/Application Support/Plex Media Server/Preferences.xml" | sed -n 's/.*PlexOnlineToken="//p' | sed "s/\".*//") [ -z PLEX_TOKEN ] && echo "Plex token not avalible, please login " && exit 0 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 )