Skip to content

Commit

Permalink
Update plex_token.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDoobPG authored Oct 31, 2019
1 parent 57344d4 commit 3f76ecc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions menu/pgscan/scripts/plex_token.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ if [ -z "$X_PLEX_TOKEN" ]; then
fi
cp -r $template $templatebackup
echo $X_PLEX_TOKEN >/var/plexguide/plex.token
sed -i 's/plex_auth_token/'$X_PLEX_TOKEN'/g' $template
#sed -i 's/plex_auth_token/'$X_PLEX_TOKEN'/g' $template
#use jq instead.
jq '.PLEX_TOKEN = "$X_PLEX_TOKEN"' $template | sponge $template

RAN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
sed -i 's/plex_autoscan_server_pass/'$RAN'/g' $template
#sed -i 's/plex_autoscan_server_pass/'$RAN'/g' $template
#use jq instead
jq '.SERVER_PASS = "$RAN"' $template | sponge $template

0 comments on commit 3f76ecc

Please sign in to comment.