added error handling for failed login

pull/6/head
michael1 2018-01-09 23:58:52 +01:00 committed by GitHub
parent c02b13d40d
commit 7be3ef83e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

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