From 63a6ea856b158197542b995f0e67c57ee99dfd17 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Fri, 3 Jun 2022 20:06:42 +0200 Subject: [PATCH] fix password input --- home.admin/config.scripts/blitz.passwords.sh | 22 +++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/home.admin/config.scripts/blitz.passwords.sh b/home.admin/config.scripts/blitz.passwords.sh index 99a945ccf..495eaab3e 100755 --- a/home.admin/config.scripts/blitz.passwords.sh +++ b/home.admin/config.scripts/blitz.passwords.sh @@ -36,9 +36,7 @@ if [ $(df | grep -c "/mnt/hdd") -gt 0 ]; then hashedPasswordSalt=$(cat ${hashedPasswordStoragePath}/salt.txt) echo "# hashedPasswordSalt(${hashedPasswordSalt})" else - echo "error='hdd not mounted yet - cannot set/check blitz passwords yet'" - echo "correct=0" - exit 1 + echo "# hashedPasswordSalt - not available yet (no HDD yet)" fi ############################ @@ -166,6 +164,12 @@ fi # PASSWORD A if [ "${abcd}" = "a" ]; then + if [ "${hashedPasswordSalt}" == "" ]; then + echo "error='hdd not mounted yet - cannot set/check blitz passwords yet'" + echo "correct=0" + exit 1 + fi + newPassword=$3 # if no password given by parameter - ask by dialog @@ -251,6 +255,12 @@ if [ "${abcd}" = "a" ]; then # PASSWORD B elif [ "${abcd}" = "b" ]; then + if [ "${hashedPasswordSalt}" == "" ]; then + echo "error='hdd not mounted yet - cannot set/check blitz passwords yet'" + echo "correct=0" + exit 1 + fi + newPassword=$3 # if no password given by parameter - ask by dialog @@ -382,6 +392,12 @@ elif [ "${abcd}" = "b" ]; then # will change both (lnd & core lightning) if installed elif [ "${abcd}" = "c" ]; then + if [ "${hashedPasswordSalt}" == "" ]; then + echo "error='hdd not mounted yet - cannot set/check blitz passwords yet'" + echo "correct=0" + exit 1 + fi + oldPassword=$3 newPassword=$4