Merge pull request #2 from michael1/patch-1

added error handling for failed login
This commit is contained in:
Alex 2018-01-10 08:11:11 +01:00 committed by GitHub
commit 2b4dd9564f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -623,11 +623,20 @@ check_status
if [ $? -eq 0 ] ; then if [ $? -eq 0 ] ; then
echo "cookie expired, logging in again ..." echo "cookie expired, logging in again ..."
log_in log_in
check_status
if [ $? -eq 0 ] ; then
echo "log in failed, aborting"
exit 1
fi
fi fi
if [ ! -f ${DEVLIST} ] ; then if [ ! -f ${DEVLIST} ] ; then
echo "device list do not exist. downloading ..." echo "device list do not exist. downloading ..."
get_devlist get_devlist
if [ ! -f ${DEVLIST} ] ; then
echo "failed to download device list, aborting"
exit 1
fi
fi fi
if [ -n "$COMMAND" -o -n "$QUEUE" ] ; then if [ -n "$COMMAND" -o -n "$QUEUE" ] ; then