From 75bbd10017a9c6023365111aead6291a5f9d34c2 Mon Sep 17 00:00:00 2001 From: openoms Date: Tue, 7 Sep 2021 14:11:32 +0100 Subject: [PATCH 1/5] srm: remove verbal and fix for rm --- home.admin/config.scripts/blitz.datadrive.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/home.admin/config.scripts/blitz.datadrive.sh b/home.admin/config.scripts/blitz.datadrive.sh index 1d835f662..607a56159 100755 --- a/home.admin/config.scripts/blitz.datadrive.sh +++ b/home.admin/config.scripts/blitz.datadrive.sh @@ -1597,18 +1597,18 @@ if [ "$1" = "clean" ]; then if [ -d "/mnt/hdd/$entry" ]; then if [ ${whenDeleteSchredd} -eq 1 ]; then >&2 echo "# shredding DIR : ${entry}" - sudo srm -lrv /mnt/hdd/$entry + sudo srm -lr /mnt/hdd/$entry else >&2 echo "# deleting DIR : ${entry}" - sudo rm -lrv /mnt/hdd/$entry + sudo rm -r /mnt/hdd/$entry fi else if [ ${whenDeleteSchredd} -eq 1 ]; then >&2 echo "# shredding FILE : ${entry}" - sudo srm -lv /mnt/hdd/$entry + sudo srm -l /mnt/hdd/$entry else >&2 echo "# deleting FILE : ${entry}" - sudo rm -lv /mnt/hdd/$entry + sudo rm /mnt/hdd/$entry fi fi From a067cb0ae7265901d49a9561737cafe48822a29b Mon Sep 17 00:00:00 2001 From: openoms Date: Tue, 7 Sep 2021 14:12:51 +0100 Subject: [PATCH 2/5] fix typos --- home.admin/_bootstrap.sh | 2 +- home.admin/config.scripts/cln.backup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index 71d61927d..f78dbe6c9 100755 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -413,7 +413,7 @@ if [ ${isMounted} -eq 0 ]; then sudo /home/admin/config.scripts/blitz.ssh.sh restore >> $logFile # determine if this is a recovery or an update - # TODO: improve version/update detetion later + # TODO: improve version/update detection later isRecovery=$(echo "${hddRaspiVersion}" | grep -c "${codeVersion}") if [ "${isRecovery}" == "1" ]; then infoMessage="Please Login for Recovery" diff --git a/home.admin/config.scripts/cln.backup.sh b/home.admin/config.scripts/cln.backup.sh index efeabc74e..87da9812d 100755 --- a/home.admin/config.scripts/cln.backup.sh +++ b/home.admin/config.scripts/cln.backup.sh @@ -171,7 +171,7 @@ if [ ${mode} = "cln-import-gui" ]; then if [ "${scenario}" == "setup" ]; then RESULTFILE=$3 if [ "${RESULTFILE}" == "" ]; then - echo "error='mising parameter'" + echo "error='missing parameter'" exit 1 fi fi From 0bf797f43a7e63fd110640554dc72e31d27f075b Mon Sep 17 00:00:00 2001 From: openoms Date: Tue, 7 Sep 2021 14:45:18 +0100 Subject: [PATCH 3/5] make clnrescue='${clnrescue}' +comment typos --- home.admin/setup.scripts/controlSetupDialog.sh | 8 ++++---- home.admin/setup.scripts/dialogLightningWallet-cln.sh | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/home.admin/setup.scripts/controlSetupDialog.sh b/home.admin/setup.scripts/controlSetupDialog.sh index 7546052e2..c81a14a9a 100755 --- a/home.admin/setup.scripts/controlSetupDialog.sh +++ b/home.admin/setup.scripts/controlSetupDialog.sh @@ -91,7 +91,7 @@ if [ "${setupPhase}" == "setup" ]; then /home/admin/setup.scripts/dialogBasicSetup.sh ${orgSetupPhase} menuresult=$? - # menu REVOVER menu option + # menu RECOVER menu option if [ "${menuresult}" == "4" ]; then setupPhase="${orgSetupPhase}" # proceed with provision (mark Password A to be set) @@ -163,7 +163,7 @@ if [ "${setupPhase}" == "setup" ]; then elif [ "${userChoice}" == "2" ]; then - # KEEP BLOCKCHAIN + DLETE ALL THE REST + # KEEP BLOCKCHAIN + DELETE ALL THE REST # when blockchain comes from another node migrate data first if [ "${hddGotMigrationData}" != "" ]; then @@ -190,7 +190,7 @@ if [ "${setupPhase}" == "setup" ]; then sudo /home/admin/config.scripts/blitz.datadrive.sh unmount sleep 2 - # by keeping that blockchain - user choosed already the blockchain type + # by keeping that blockchain - user chose already the blockchain type echo "Selecting as blockchain network automatically .." if [ "${hddBlocksLitecoin}" == "1" ]; then echo "network=litecoin" >> $SETUPFILE @@ -269,7 +269,7 @@ if [ "${setupPhase}" == "setup" ]; then dialogResult=$? else - echo "FAIL: unkown lightning implementation (${lightning})" + echo "FAIL: unknown lightning implementation (${lightning})" lightningWalletDone=1 sleep 8 fi diff --git a/home.admin/setup.scripts/dialogLightningWallet-cln.sh b/home.admin/setup.scripts/dialogLightningWallet-cln.sh index 1b486d6e8..233c767c2 100644 --- a/home.admin/setup.scripts/dialogLightningWallet-cln.sh +++ b/home.admin/setup.scripts/dialogLightningWallet-cln.sh @@ -94,7 +94,7 @@ else exit 1 fi -# UPLOAD LND RESCUE FILE dialog (if activated by dialogs above) +# UPLOAD CLN RESCUE FILE dialog (if activated by dialogs above) if [ ${uploadRESCUE} -eq 1 ]; then # run upload dialog and get result @@ -114,7 +114,7 @@ if [ ${uploadRESCUE} -eq 1 ]; then sudo sed -i '/^clnrescue=/d' $SETUPFILE # store result in setup state - echo "clnrescue='${lndrescue}'" >> $SETUPFILE + echo "clnrescue='${clnrescue}'" >> $SETUPFILE fi # INPUT LIGHTNING SEED dialog (if activated by dialogs above) From c9beeab72f6cb95643cec7cfb11ff212fe7e5c1b Mon Sep 17 00:00:00 2001 From: openoms Date: Tue, 7 Sep 2021 14:54:37 +0100 Subject: [PATCH 4/5] create configfile to set owner and mod --- home.admin/setup.scripts/controlSetupDialog.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/home.admin/setup.scripts/controlSetupDialog.sh b/home.admin/setup.scripts/controlSetupDialog.sh index c81a14a9a..262297dc9 100755 --- a/home.admin/setup.scripts/controlSetupDialog.sh +++ b/home.admin/setup.scripts/controlSetupDialog.sh @@ -299,6 +299,7 @@ if [ "${setupPhase}" == "setup" ]; then # prepare config file CONFIGFILE="/var/cache/raspiblitz/temp/raspiblitz.conf" sudo rm $CONFIGFILE 2>/dev/null + sudo touch $CONFIGFILE sudo chown admin:admin $CONFIGFILE sudo chmod 777 $CONFIGFILE From 6214e81f3bd856fda1de9f25812102694944c9f0 Mon Sep 17 00:00:00 2001 From: openoms Date: Tue, 7 Sep 2021 15:00:52 +0100 Subject: [PATCH 5/5] fix variable names of clnrescue --- home.admin/_provision.setup.sh | 4 ++-- home.admin/config.scripts/cln.backup.sh | 2 +- home.admin/setup.scripts/dialogLightningWallet-cln.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/home.admin/_provision.setup.sh b/home.admin/_provision.setup.sh index 8f90d8929..3121c8895 100755 --- a/home.admin/_provision.setup.sh +++ b/home.admin/_provision.setup.sh @@ -365,8 +365,8 @@ if [ "${lightning}" == "cln" ]; then # OLD WALLET FROM CLIGHTNING RESCUE if [ "${clnrescue}" != "" ]; then - echo "Restore CLN data from uploaded rescue file ${lndrescue} ..." >> ${logFile} - source <(sudo /home/admin/config.scripts/cln.backup.sh cln-import ${lndrescue}) + echo "Restore CLN data from uploaded rescue file ${clnrescue} ..." >> ${logFile} + source <(sudo /home/admin/config.scripts/cln.backup.sh cln-import ${clnrescue}) if [ "${error}" != "" ]; then sed -i "s/^state=.*/state=error/g" ${infoFile} sed -i "s/^message=.*/message='setup: cln import backup failed'/g" ${infoFile} diff --git a/home.admin/config.scripts/cln.backup.sh b/home.admin/config.scripts/cln.backup.sh index 87da9812d..a368d8035 100755 --- a/home.admin/config.scripts/cln.backup.sh +++ b/home.admin/config.scripts/cln.backup.sh @@ -245,7 +245,7 @@ if [ ${mode} = "cln-import-gui" ]; then # in setup scenario the final import is happening during provison if [ "${scenario}" == "setup" ]; then - # just add lndrescue filename to give file + # just add clnrescue filename to give file echo "# result in: ${RESULTFILE} (remember to make clean delete once processed)" echo "clnrescue='${filename}'" >> $RESULTFILE exit 0 diff --git a/home.admin/setup.scripts/dialogLightningWallet-cln.sh b/home.admin/setup.scripts/dialogLightningWallet-cln.sh index 233c767c2..39dd33d18 100644 --- a/home.admin/setup.scripts/dialogLightningWallet-cln.sh +++ b/home.admin/setup.scripts/dialogLightningWallet-cln.sh @@ -106,7 +106,7 @@ if [ ${uploadRESCUE} -eq 1 ]; then # if user canceled upload if [ "${clnrescue}" == "" ]; then - # signal cancel to the calling script by exit code (3 = exit on lndrescue) + # signal cancel to the calling script by exit code (3 = exit on clnrescue) exit 3 fi