This commit is contained in:
rootzoll 2021-09-08 22:37:34 +02:00
commit ecf354798a
6 changed files with 31 additions and 21 deletions

View File

@ -15,10 +15,8 @@ TITLE=" ${CHAIN} System Options "
MENU="" # adds lines to HEIGHT
OPTIONS=() # adds lines to HEIGHt + CHOICE_HEIGHT
if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then
OPTIONS+=(${network}LOG "Monitor the debug.log for ${CHAIN}")
OPTIONS+=(${network}CONF "Edit the bitcoin.conf")
fi
OPTIONS+=(${network}LOG "Monitor the debug.log for ${CHAIN}")
OPTIONS+=(${network}CONF "Edit the bitcoin.conf")
if grep "^${netprefix}lnd=on" /mnt/hdd/raspiblitz.conf;then
OPTIONS+=(LNDLOG "Monitor the lnd.log for ${CHAIN}")

View File

@ -60,7 +60,7 @@ source ${configFile} 2>/dev/null
source <(/home/admin/config.scripts/internet.sh status)
# get basic hardware info
source <(/home/admin/config.scripts/.sh status)
source <(/home/admin/config.scripts/blitz.hardware.sh status)
# get basic dns info
source <(sudo /home/admin/config.scripts/internet.dns.sh test nodialog)
@ -101,7 +101,7 @@ if [ "${flagExists}" == "1" ]; then
sudo rm /boot/stop
sed -i "s/^state=.*/state=stop/g" ${infoFile}
sed -i "s/^message=.*/message='stopped for manual provision'/g" ${infoFile}
echo "INFO: 'bootstrap stopped - run release after manual provison" >> ${logFile}
echo "INFO: 'bootstrap stopped - run release after manual provison'" >> ${logFile}
exit 0
fi
@ -112,7 +112,7 @@ if [ "${provisionFlagExists}" == "1" ]; then
sudo systemctl stop lnd 2>/dev/null
sed -i "s/^state=.*/state=inconsistentsystem/g" ${infoFile}
sed -i "s/^message=.*/message='provision did not ran thru'/g" ${infoFile}
echo "FAIL: 'provision did not ran thru - need fresh sd card!" >> ${logFile}
echo "FAIL: 'provision did not ran thru' - need fresh sd card!" >> ${logFile}
exit 1
fi

View File

@ -282,6 +282,7 @@ if [ "$1" = "export" ]; then
# zip it
echo "# Building the Export File (this can take some time) .."
sudo mkdir -p ${defaultUploadPath}
sudo tar -zcvf ${defaultUploadPath}/raspiblitz-export-temp.tar.gz -X ~/.exclude.temp /mnt/hdd 1>~/.include.temp 2>/dev/null
# get md5 checksum

View File

@ -64,14 +64,15 @@ if [ $1 = on ];then
/home/bitcoin/${netprefix}lightningd.sqlite3.backup.${now} || exit 1
fi
# init plugin
if ! sudo ls /home/bitcoin/.lightning/${CLNETWORK}/backup.lock; then
# https://github.com/lightningd/plugins/tree/master/backup#setup
echo "# Initialize the backup plugin"
sudo -u bitcoin ${plugindir}/backup/backup-cli init\
--lightning-dir /home/bitcoin/.lightning/${CLNETWORK} \
file:///home/bitcoin/${netprefix}lightningd.sqlite3.backup
# always re-init plugin
if sudo ls /home/bitcoin/.lightning/${CLNETWORK}/backup.lock; then
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/backup.lock
fi
# https://github.com/lightningd/plugins/tree/master/backup#setup
echo "# Initialize the backup plugin"
sudo -u bitcoin ${plugindir}/backup/backup-cli init\
--lightning-dir /home/bitcoin/.lightning/${CLNETWORK} \
file:///home/bitcoin/${netprefix}lightningd.sqlite3.backup
source /home/admin/raspiblitz.info
if [ "${state}" == "ready" ]; then
@ -79,9 +80,10 @@ if [ $1 = on ];then
echo "# Started the ${netprefix}lightningd.service"
fi
elif [ $1 = off ];then
echo "# Removing the backup plugin"
¬ sudo rm -f /home/bitcoin/${netprefix}cln-plugins-enabled/backup.py
sudo rm -f /home/bitcoin/${netprefix}cln-plugins-enabled/backup.py
echo "# Backup the existing old backup on the SDcard"
now=$(date +"%Y_%m_%d_%H%M%S")
sudo mv /home/bitcoin/${netprefix}lightningd.sqlite3.backup \
@ -89,6 +91,7 @@ elif [ $1 = off ];then
echo "# Removing the backup.lock file"
sudo rm -f /home/bitcoin/.lightning/${CLNETWORK}/backup.lock
elif [ $1 = restore ];then
install
@ -116,10 +119,15 @@ elif [ $1 = restore ];then
sudo -u bitcoin ${plugindir}/backup/backup-cli restore \
file:///home/bitcoin/${netprefix}lightningd.sqlite3.backup \
/home/bitcoin/.lightning/${CLNETWORK}/lightningd.sqlite3
sudo systemctl start ${netprefix}lightningd
source /home/admin/raspiblitz.info
if [ "${state}" == "ready" ]; then
sudo systemctl start ${netprefix}lightningd
echo "# Started the ${netprefix}lightningd.service"
fi
fi
elif [ $1 = backup-compact ];then
if sudo ls /home/bitcoin/.lightning/${CLNETWORK}/lightningd.sqlite3;then

View File

@ -296,6 +296,9 @@ if [ ${mode} = "cln-import-gui" ]; then
echo "# Starting cln.hsmtool.sh unlock"
/home/admin/config.scripts/cln.hsmtool.sh unlock # there are mutiple wallets possible, need to check for non-default ones too
fi
# init backup plugin
/home/admin/config.scripts/cln-plugin.backup.sh on $CHAIN
# restarting cln & give final info
sudo systemctl start lightningd

View File

@ -102,10 +102,10 @@ fi
# when coming from fresh setup
if [ "${setupPhase}" == "setup" ]; then
clear
whiptail --title " SetUp Done " --msgbox "\
Your RaspiBlitz Setup is done. Welcome new node operator! :D\n
There might now be some waiting time until your Blockchain is fully synced before you can enter the RaspiBlitz user menu.\n
Its safe to logout during sync and return later.\n
whiptail --title " Setup Done " --msgbox "\
Your RaspiBlitz setup is done. Welcome new Node Operator! :D\n
There can be some waiting time until your blockchain is fully synced before you can enter the RaspiBlitz user menu.\n
It is safe to log out during the sync and return later.\n
" 12 65
# when coming from migration from other node