mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-10 12:53:01 +02:00
Merge branch 'dev' of https://github.com/rootzoll/raspiblitz into dev
This commit is contained in:
@@ -413,7 +413,7 @@ if [ ${isMounted} -eq 0 ]; then
|
|||||||
sudo /home/admin/config.scripts/blitz.ssh.sh restore >> $logFile
|
sudo /home/admin/config.scripts/blitz.ssh.sh restore >> $logFile
|
||||||
|
|
||||||
# determine if this is a recovery or an update
|
# 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}")
|
isRecovery=$(echo "${hddRaspiVersion}" | grep -c "${codeVersion}")
|
||||||
if [ "${isRecovery}" == "1" ]; then
|
if [ "${isRecovery}" == "1" ]; then
|
||||||
infoMessage="Please Login for Recovery"
|
infoMessage="Please Login for Recovery"
|
||||||
|
@@ -365,8 +365,8 @@ if [ "${lightning}" == "cln" ]; then
|
|||||||
# OLD WALLET FROM CLIGHTNING RESCUE
|
# OLD WALLET FROM CLIGHTNING RESCUE
|
||||||
if [ "${clnrescue}" != "" ]; then
|
if [ "${clnrescue}" != "" ]; then
|
||||||
|
|
||||||
echo "Restore CLN data from uploaded rescue file ${lndrescue} ..." >> ${logFile}
|
echo "Restore CLN data from uploaded rescue file ${clnrescue} ..." >> ${logFile}
|
||||||
source <(sudo /home/admin/config.scripts/cln.backup.sh cln-import ${lndrescue})
|
source <(sudo /home/admin/config.scripts/cln.backup.sh cln-import ${clnrescue})
|
||||||
if [ "${error}" != "" ]; then
|
if [ "${error}" != "" ]; then
|
||||||
sed -i "s/^state=.*/state=error/g" ${infoFile}
|
sed -i "s/^state=.*/state=error/g" ${infoFile}
|
||||||
sed -i "s/^message=.*/message='setup: cln import backup failed'/g" ${infoFile}
|
sed -i "s/^message=.*/message='setup: cln import backup failed'/g" ${infoFile}
|
||||||
|
@@ -1597,18 +1597,18 @@ if [ "$1" = "clean" ]; then
|
|||||||
if [ -d "/mnt/hdd/$entry" ]; then
|
if [ -d "/mnt/hdd/$entry" ]; then
|
||||||
if [ ${whenDeleteSchredd} -eq 1 ]; then
|
if [ ${whenDeleteSchredd} -eq 1 ]; then
|
||||||
>&2 echo "# shredding DIR : ${entry}"
|
>&2 echo "# shredding DIR : ${entry}"
|
||||||
sudo srm -lrv /mnt/hdd/$entry
|
sudo srm -lr /mnt/hdd/$entry
|
||||||
else
|
else
|
||||||
>&2 echo "# deleting DIR : ${entry}"
|
>&2 echo "# deleting DIR : ${entry}"
|
||||||
sudo rm -lrv /mnt/hdd/$entry
|
sudo rm -r /mnt/hdd/$entry
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ ${whenDeleteSchredd} -eq 1 ]; then
|
if [ ${whenDeleteSchredd} -eq 1 ]; then
|
||||||
>&2 echo "# shredding FILE : ${entry}"
|
>&2 echo "# shredding FILE : ${entry}"
|
||||||
sudo srm -lv /mnt/hdd/$entry
|
sudo srm -l /mnt/hdd/$entry
|
||||||
else
|
else
|
||||||
>&2 echo "# deleting FILE : ${entry}"
|
>&2 echo "# deleting FILE : ${entry}"
|
||||||
sudo rm -lv /mnt/hdd/$entry
|
sudo rm /mnt/hdd/$entry
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -171,7 +171,7 @@ if [ ${mode} = "cln-import-gui" ]; then
|
|||||||
if [ "${scenario}" == "setup" ]; then
|
if [ "${scenario}" == "setup" ]; then
|
||||||
RESULTFILE=$3
|
RESULTFILE=$3
|
||||||
if [ "${RESULTFILE}" == "" ]; then
|
if [ "${RESULTFILE}" == "" ]; then
|
||||||
echo "error='mising parameter'"
|
echo "error='missing parameter'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -245,7 +245,7 @@ if [ ${mode} = "cln-import-gui" ]; then
|
|||||||
|
|
||||||
# in setup scenario the final import is happening during provison
|
# in setup scenario the final import is happening during provison
|
||||||
if [ "${scenario}" == "setup" ]; then
|
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 "# result in: ${RESULTFILE} (remember to make clean delete once processed)"
|
||||||
echo "clnrescue='${filename}'" >> $RESULTFILE
|
echo "clnrescue='${filename}'" >> $RESULTFILE
|
||||||
exit 0
|
exit 0
|
||||||
|
@@ -91,7 +91,7 @@ if [ "${setupPhase}" == "setup" ]; then
|
|||||||
/home/admin/setup.scripts/dialogBasicSetup.sh ${orgSetupPhase}
|
/home/admin/setup.scripts/dialogBasicSetup.sh ${orgSetupPhase}
|
||||||
menuresult=$?
|
menuresult=$?
|
||||||
|
|
||||||
# menu REVOVER menu option
|
# menu RECOVER menu option
|
||||||
if [ "${menuresult}" == "4" ]; then
|
if [ "${menuresult}" == "4" ]; then
|
||||||
setupPhase="${orgSetupPhase}"
|
setupPhase="${orgSetupPhase}"
|
||||||
# proceed with provision (mark Password A to be set)
|
# proceed with provision (mark Password A to be set)
|
||||||
@@ -163,7 +163,7 @@ if [ "${setupPhase}" == "setup" ]; then
|
|||||||
|
|
||||||
elif [ "${userChoice}" == "2" ]; 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
|
# when blockchain comes from another node migrate data first
|
||||||
if [ "${hddGotMigrationData}" != "" ]; then
|
if [ "${hddGotMigrationData}" != "" ]; then
|
||||||
@@ -190,7 +190,7 @@ if [ "${setupPhase}" == "setup" ]; then
|
|||||||
sudo /home/admin/config.scripts/blitz.datadrive.sh unmount
|
sudo /home/admin/config.scripts/blitz.datadrive.sh unmount
|
||||||
sleep 2
|
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 .."
|
echo "Selecting as blockchain network automatically .."
|
||||||
if [ "${hddBlocksLitecoin}" == "1" ]; then
|
if [ "${hddBlocksLitecoin}" == "1" ]; then
|
||||||
echo "network=litecoin" >> $SETUPFILE
|
echo "network=litecoin" >> $SETUPFILE
|
||||||
@@ -269,7 +269,7 @@ if [ "${setupPhase}" == "setup" ]; then
|
|||||||
dialogResult=$?
|
dialogResult=$?
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "FAIL: unkown lightning implementation (${lightning})"
|
echo "FAIL: unknown lightning implementation (${lightning})"
|
||||||
lightningWalletDone=1
|
lightningWalletDone=1
|
||||||
sleep 8
|
sleep 8
|
||||||
fi
|
fi
|
||||||
@@ -299,6 +299,7 @@ if [ "${setupPhase}" == "setup" ]; then
|
|||||||
# prepare config file
|
# prepare config file
|
||||||
CONFIGFILE="/var/cache/raspiblitz/temp/raspiblitz.conf"
|
CONFIGFILE="/var/cache/raspiblitz/temp/raspiblitz.conf"
|
||||||
sudo rm $CONFIGFILE 2>/dev/null
|
sudo rm $CONFIGFILE 2>/dev/null
|
||||||
|
sudo touch $CONFIGFILE
|
||||||
sudo chown admin:admin $CONFIGFILE
|
sudo chown admin:admin $CONFIGFILE
|
||||||
sudo chmod 777 $CONFIGFILE
|
sudo chmod 777 $CONFIGFILE
|
||||||
|
|
||||||
|
@@ -94,7 +94,7 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
if [ ${uploadRESCUE} -eq 1 ]; then
|
||||||
|
|
||||||
# run upload dialog and get result
|
# run upload dialog and get result
|
||||||
@@ -106,7 +106,7 @@ if [ ${uploadRESCUE} -eq 1 ]; then
|
|||||||
|
|
||||||
# if user canceled upload
|
# if user canceled upload
|
||||||
if [ "${clnrescue}" == "" ]; then
|
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
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ if [ ${uploadRESCUE} -eq 1 ]; then
|
|||||||
sudo sed -i '/^clnrescue=/d' $SETUPFILE
|
sudo sed -i '/^clnrescue=/d' $SETUPFILE
|
||||||
|
|
||||||
# store result in setup state
|
# store result in setup state
|
||||||
echo "clnrescue='${lndrescue}'" >> $SETUPFILE
|
echo "clnrescue='${clnrescue}'" >> $SETUPFILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# INPUT LIGHTNING SEED dialog (if activated by dialogs above)
|
# INPUT LIGHTNING SEED dialog (if activated by dialogs above)
|
||||||
|
Reference in New Issue
Block a user