mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-07-31 12:00:07 -07:00
Don't emit token error unless email/pass is empty
This commit is contained in:
parent
0ad1928df6
commit
a38f8496cb
1 changed files with 4 additions and 1 deletions
|
@ -211,7 +211,10 @@ getPlexServerToken() {
|
||||||
|
|
||||||
for I in "${VALIDPATHS[@]}" ; do
|
for I in "${VALIDPATHS[@]}" ; do
|
||||||
if [ ! -z "${I}" -a -f "${I}${PREFFILE}" ]; then
|
if [ ! -z "${I}" -a -f "${I}${PREFFILE}" ]; then
|
||||||
sed -n 's/.*PlexOnlineToken="\([[:alnum:]]*\).*".*/\1/p' "${I}${PREFFILE}" 2>/dev/null || error "Do not have permission to read token from Plex Server preference file"
|
sed -n 's/.*PlexOnlineToken="\([[:alnum:]]*\).*".*/\1/p' "${I}${PREFFILE}" 2>/dev/null
|
||||||
|
if [ $? -ne 0 -a -z "${EMAIL}" -a -z "${PASS}" ]; then
|
||||||
|
error "Do not have permission to read token from Plex Server preference file"
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue