mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 22:58:43 +01:00
#729 adding option to the service menu
This commit is contained in:
parent
6a69d4a923
commit
2c145044d8
1 changed files with 21 additions and 0 deletions
|
@ -23,6 +23,9 @@ if [ ${#ElectRS} -eq 0 ]; then ElectRS="off"; fi
|
|||
if [ ${#lndmanage} -eq 0 ]; then lndmanage="off"; fi
|
||||
if [ ${#LNBits} -eq 0 ]; then LNBits="off"; fi
|
||||
|
||||
DropboxBackup="off";
|
||||
if [ ${#dropboxBackupTarget} -gt 0 ]; then DropboxBackup="on"; fi
|
||||
|
||||
echo "map chain to on/off"
|
||||
chainValue="off"
|
||||
if [ "${chain}" = "test" ]; then chainValue="on"; fi
|
||||
|
@ -75,6 +78,7 @@ e 'Electrum Rust Server' ${ElectRS} \
|
|||
p 'BTCPayServer' ${BTCPayServer} \
|
||||
m 'lndmanage' ${lndmanage} \
|
||||
i 'LNBits' ${LNBits} \
|
||||
d 'Static Channel Backup on DropBox' ${DropboxBackup} \
|
||||
2>&1 >/dev/tty)
|
||||
else
|
||||
CHOICES=$(dialog --title ' Additional Services ' --checklist ' use spacebar to activate/de-activate ' 20 45 12 \
|
||||
|
@ -95,6 +99,7 @@ e 'Electrum Rust Server' ${ElectRS} \
|
|||
p 'BTCPayServer' ${BTCPayServer} \
|
||||
m 'lndmanage' ${lndmanage} \
|
||||
i 'LNBits' ${LNBits} \
|
||||
d 'Static Channel Backup on DropBox' ${DropboxBackup} \
|
||||
2>&1 >/dev/tty)
|
||||
fi
|
||||
|
||||
|
@ -539,6 +544,22 @@ else
|
|||
echo "lndmanage setting unchanged."
|
||||
fi
|
||||
|
||||
# DropBox process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "d")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${DropboxBackup}" != "${choice}" ]; then
|
||||
echo "DropBox Setting changed .."
|
||||
anychange=1
|
||||
sudo -u admin /home/admin/config.scripts/dropbox.upload.sh ${choice}
|
||||
if [ "${choice}" = "on" ]; then
|
||||
# doing initial upload so that user can see result
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
sudo /home/admin/config.scripts/dropbox.upload.sh upload ${dropboxBackupTarget} /home/admin/.lnd/data/chain/${network}/${chain}net/channel.backup
|
||||
fi
|
||||
else
|
||||
echo "lndmanage setting unchanged."
|
||||
fi
|
||||
|
||||
if [ ${anychange} -eq 0 ]; then
|
||||
dialog --msgbox "NOTHING CHANGED!\nUse Spacebar to check/uncheck services." 8 58
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Reference in a new issue