diff --git a/readpass.sh b/readpass.sh index 1354fa6..ee40614 100644 --- a/readpass.sh +++ b/readpass.sh @@ -1,23 +1,19 @@ - if [ -f $CREDENTIALS ] then source $CREDENTIALS -elif [ "$LOGIN" = "2" ] -then - if [ -f $CREDENTIALS ] + if [ "$LOGIN" = "2" ] then - echo "${red}Saved Credentials has been changed${reset}" - rm $CREDENTIALS + echo "${red}Password update required${reset}" + rm $CREDENTIALS 2> /dev/null + read -p 'Username: ' BML_USERNAME + read -s -p 'Password: ' BML_PASSWORD + echo "" else - echo "${red}Username or Password incorrect${reset}" + : fi - read -p 'Username: ' BML_USERNAME - read -s -p 'Password: ' BML_PASSWORD - echo "" - elif [ ! -f $CREDENTIALS ] then - echo "${red}Password file not found in $CREDENTIALS${reset}" + echo "${red}Username or Password in correct${reset}" read -p 'Username: ' BML_USERNAME read -s -p 'Password: ' BML_PASSWORD echo "" @@ -25,5 +21,4 @@ else : fi - source login.sh