mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-14 02:26:56 -07:00
Added additional sanity for email checking
This commit is contained in:
parent
7e11b392f7
commit
446fe0ba3e
1 changed files with 6 additions and 2 deletions
|
@ -490,10 +490,14 @@ fi
|
|||
|
||||
# Sanity check
|
||||
if [ -z "${EMAIL}" -o -z "${PASS}" ] && [ "${PUBLIC}" = "no" ]; then
|
||||
errorLog "Need username & password to download PlexPass version. Otherwise run with -p to download public version."
|
||||
errorLog "Need email & password to download PlexPass version. Otherwise run with -p to download public version."
|
||||
cronexit 1
|
||||
elif [ ! -z "${EMAIL}" ] && [[ "$EMAIL" != *"@"*"."* ]]; then
|
||||
errorLog "EMAIL field must contain an email address"
|
||||
cronexit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ "${AUTOINSTALL}" = "yes" -o "${AUTOSTART}" = "yes" ]; then
|
||||
id | grep -i 'uid=0(' 2>&1 >/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
|
@ -640,7 +644,7 @@ if [ "${PUBLIC}" = "no" ]; then
|
|||
# Provide some details to the end user
|
||||
RESULTCODE=$(head -n1 "${FILE_RAW}" | grep -oe '[1-5][0-9][0-9]')
|
||||
if [ $RESULTCODE -eq 401 ]; then
|
||||
errorLog "Username and/or password incorrect"
|
||||
errorLog "email and/or password incorrect"
|
||||
if [ "$VERBOSE" = "yes" ]; then
|
||||
errorLog "Tried using \"${EMAIL}\" and \"${PASS}\" "
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue