mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-07-30 17:14:16 +02:00
Re-order authentication errors in verbose mode
Signed-off-by: Christian König <github@yubiuser.dev>
This commit is contained in:
parent
9605ccc178
commit
71501e15e5
@ -150,7 +150,6 @@ LoginAPI() {
|
|||||||
|
|
||||||
# Try to login again until the session is valid
|
# Try to login again until the session is valid
|
||||||
while [ ! "${validSession}" = true ] ; do
|
while [ ! "${validSession}" = true ] ; do
|
||||||
echo "Authentication failed. Please enter your Pi-hole password"
|
|
||||||
|
|
||||||
# Print the error message if there is one
|
# Print the error message if there is one
|
||||||
if [ ! "${sessionError}" = "null" ] && [ "${1}" = "verbose" ]; then
|
if [ ! "${sessionError}" = "null" ] && [ "${1}" = "verbose" ]; then
|
||||||
@ -161,6 +160,14 @@ LoginAPI() {
|
|||||||
echo "Error: ${sessionMessage}"
|
echo "Error: ${sessionMessage}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${1}" = "verbose" ]; then
|
||||||
|
# If we are not in verbose mode, no need to print the error message again
|
||||||
|
echo "Please enter your Pi-hole password"
|
||||||
|
else
|
||||||
|
|
||||||
|
echo "Authentication failed. Please enter your Pi-hole password"
|
||||||
|
fi
|
||||||
|
|
||||||
# secretly read the password
|
# secretly read the password
|
||||||
secretRead; printf '\n'
|
secretRead; printf '\n'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user