set the lightningd.service on each active network

This commit is contained in:
openoms 2021-09-16 22:15:54 +01:00
parent db83ca4b83
commit d9a4c2015f
No known key found for this signature in database
GPG Key ID: 5BFB77609B081B65
3 changed files with 31 additions and 9 deletions

View File

@ -104,8 +104,16 @@ case $CHOICE in
/mnt/hdd/raspiblitz.conf
# new
/home/admin/config.scripts/cln.hsmtool.sh new $CHAIN
# set the lightningd service file
/home/admin/config.scripts/cln.install-service.sh $CHAIN
# set the lightningd service file on each active network
if [ "${cln}" == "on" ] || [ "${cln}" == "1" ]; then
/home/admin/config.scripts/cln.install-service.sh mainnet
fi
if [ "${tcln}" == "on" ] || [ "${tcln}" == "1" ]; then
/home/admin/config.scripts/cln.install-service.sh testnet
fi
if [ "${scln}" == "on" ] || [ "${scln}" == "1" ]; then
/home/admin/config.scripts/cln.install-service.sh signet
fi
;;
FILERESTORE)

View File

@ -296,11 +296,22 @@ if [ ${mode} = "cln-import-gui" ]; then
/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
# set the lightningd service file on each active network
# init backup plugin, restart cln
if [ "${cln}" == "on" ] || [ "${cln}" == "1" ]; then
/home/admin/config.scripts/cln.install-service.sh mainnet
/home/admin/config.scripts/cln-plugin.backup.sh on mainnet
fi
if [ "${tcln}" == "on" ] || [ "${tcln}" == "1" ]; then
/home/admin/config.scripts/cln.install-service.sh testnet
/home/admin/config.scripts/cln-plugin.backup.sh on testnet
fi
if [ "${scln}" == "on" ] || [ "${scln}" == "1" ]; then
/home/admin/config.scripts/cln.install-service.sh signet
/home/admin/config.scripts/cln-plugin.backup.sh on signet
fi
# give final info
echo
echo "# DONE - lightningd is now starting"
echo "# Check that CLN is starting up correctly and your old channels & funds are restored."

View File

@ -60,5 +60,8 @@ sudo systemctl daemon-reload
sudo systemctl enable ${netprefix}lightningd
echo "# Enabled the ${netprefix}lightningd.service"
sudo systemctl start ${netprefix}lightningd
echo "# Started the ${netprefix}lightningd.service"
source /home/admin/raspiblitz.info
if [ "${state}" == "ready" ]; then
sudo systemctl start ${netprefix}lightningd
echo "# Started the ${netprefix}lightningd.service"
fi