test result of password config

This commit is contained in:
rootzoll
2019-01-14 18:13:45 +01:00
parent 34071dc6c6
commit b965d56cae
2 changed files with 9 additions and 5 deletions

View File

@@ -378,8 +378,8 @@ case $CHOICE in
sudo shutdown -r now sudo shutdown -r now
;; ;;
PASSWORD) PASSWORD)
sudo /home/admin/config.scripts/blitz.setpassword.sh result=$(sudo /home/admin/config.scripts/blitz.setpassword.sh)
echo "Press ENTER to Reboot." echo "Press ENTER to Reboot. (${result})"
read key read key
sudo shutdown -r now sudo shutdown -r now
;; ;;

View File

@@ -4,6 +4,7 @@
if [ "$1" = "-h" ] || [ "$1" = "-help" ]; then if [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
echo "small config script to set a passwords A,B,C & D" echo "small config script to set a passwords A,B,C & D"
echo "blitz.setpassword.sh [?a|b|c|d] [?newpassword] " echo "blitz.setpassword.sh [?a|b|c|d] [?newpassword] "
echo "exits on 0 = needs reboot"
exit 1 exit 1
fi fi
@@ -131,6 +132,7 @@ if [ "${abcd}" = "a" ]; then
echo "" echo ""
echo "OK - password A changed for user pi, root, admin & bitcoin" echo "OK - password A changed for user pi, root, admin & bitcoin"
exit 0
############################ ############################
# PASSWORD B # PASSWORD B
@@ -199,6 +201,7 @@ elif [ "${abcd}" = "b" ]; then
echo "OK -> RPC Password B changed" echo "OK -> RPC Password B changed"
echo "if services are running - reboot is needed to activate new settings" echo "if services are running - reboot is needed to activate new settings"
exit 0
############################ ############################
# PASSWORD C # PASSWORD C
@@ -231,6 +234,7 @@ elif [ "${abcd}" = "c" ]; then
# final user output # final user output
echo "" echo ""
echo "OK" echo "OK"
exit 0
############################ ############################
# PASSWORD D # PASSWORD D
@@ -238,10 +242,10 @@ elif [ "${abcd}" = "d" ]; then
echo "#### NOTICE ####" echo "#### NOTICE ####"
echo "Sorry - the password D cannot be changed. Its the password you set on creating your wallet to protect your seed (the list of words)." echo "Sorry - the password D cannot be changed. Its the password you set on creating your wallet to protect your seed (the list of words)."
exit 1
# everything else # everything else
else else
echo "FAIL: there is no password '${abcd}' (reminder: use lower case)" echo "FAIL: there is no password '${abcd}' (reminder: use lower case)"
fi exit 1
fi
echo ""