From 0c9fe9a68414140c4337b05e0047e1cd75ddb648 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Mon, 3 May 2021 15:12:52 +0200 Subject: [PATCH] set passwords in all lightning choices --- .../setup.scripts/dialogLightningWallet.sh | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/home.admin/setup.scripts/dialogLightningWallet.sh b/home.admin/setup.scripts/dialogLightningWallet.sh index 70c5f863d..b94c03cde 100644 --- a/home.admin/setup.scripts/dialogLightningWallet.sh +++ b/home.admin/setup.scripts/dialogLightningWallet.sh @@ -62,6 +62,16 @@ elif [ "${CHOICE}" == "OLD" ]; then enterSEED=1 uploadSCB=1 + # clear setup state from all fomer possible choices (previous loop) + sudo sed -i '/^setPasswordA=/d' $SETUPFILE + sudo sed -i '/^setPasswordB=/d' $SETUPFILE + sudo sed -i '/^setPasswordC=/d' $SETUPFILE + + # mark all passwords to be set at the end + echo "setPasswordA=1" >> $SETUPFILE + echo "setPasswordB=1" >> $SETUPFILE + echo "setPasswordC=1" >> $SETUPFILE + elif [ "${CHOICESUB}" == "ONLYSEED" ]; then # let people know about the difference between SEED & SEED+SCB @@ -78,6 +88,17 @@ or having a complete LND rescue-backup from your old node. else # activate SEED input & SCB upload enterSEED=1 + + # clear setup state from all fomer possible choices (previous loop) + sudo sed -i '/^setPasswordA=/d' $SETUPFILE + sudo sed -i '/^setPasswordB=/d' $SETUPFILE + sudo sed -i '/^setPasswordC=/d' $SETUPFILE + + # mark all passwords to be set at the end + echo "setPasswordA=1" >> $SETUPFILE + echo "setPasswordB=1" >> $SETUPFILE + echo "setPasswordC=1" >> $SETUPFILE + fi else