Skip to content

Commit

Permalink
Merge pull request #12 from thalweg/master
Browse files Browse the repository at this point in the history
Only use Plex Pass creds when necessary
  • Loading branch information
mstinaff committed Apr 15, 2016
2 parents f1c4e83 + 794ca36 commit 885ac45
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions PMS_Updater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,16 @@ webGet()
local LOGININFO=""
local QUIET="--quiet"

if [ ! "x$USERPASSFILE" = "x" ] && [ -e $USERPASSFILE ]; then
LOGININFO="--config=$USERPASSFILE"
elif [ ! "x$USERNAME" = "x" ]; then
if [ "x$PASSWORD" = "x" ]; then
LOGININFO="--http-user=$USERNAME --ask-password"
else
LOGININFO="--http-user=$USERNAME --http-password=$PASSWORD"
fi
if [ $PLEXPASS = 1 ]; then
if [ ! "x$USERPASSFILE" = "x" ] && [ -e $USERPASSFILE ]; then
LOGININFO="--config=$USERPASSFILE"
elif [ ! "x$USERNAME" = "x" ]; then
if [ "x$PASSWORD" = "x" ]; then
LOGININFO="--http-user=$USERNAME --ask-password"
else
LOGININFO="--http-user=$USERNAME --http-password=$PASSWORD"
fi
fi
fi

if [ $VERBOSE = 1 ]; then QUIET=""; fi
Expand Down Expand Up @@ -194,7 +196,7 @@ applyUpdate()
} else {
echo Done. | LogMsg -f
} fi
ln -s $PMSPARENTPATH/$PMSLIVEFOLDER/Plex\ Media\ Server $PMSPARENTPATH/$PMSLIVEFOLDER/Plex_Media_Server 2>&1 | LogMsg
ln -s $PMSPARENTPATH/$PMSLIVEFOLDER/Plex\ Media\ Server $PMSPARENTPATH/$PMSLIVEFOLDER/Plex_Media_Server 2>&1 | LogMsg
ln -s $PMSPARENTPATH/$PMSLIVEFOLDER/libpython2.7.so.1 $PMSPARENTPATH/$PMSLIVEFOLDER/libpython2.7.so 2>&1 | LogMsg
echo Starting Plex Media Server .....| LogMsg -n
service plexmediaserver start
Expand Down

0 comments on commit 885ac45

Please sign in to comment.