|
|
@ -34,7 +34,7 @@ fi |
|
|
|
|
|
|
|
# show select dialog |
|
|
|
echo "run dialog ..." |
|
|
|
CHOICES=$(dialog --checklist 'Activate/Deactivate Services:' 15 45 7 \ |
|
|
|
CHOICES=$(dialog --title "spacebar => check/uncheck" --checklist 'Activate/Deactivate Services:' 15 45 7 \ |
|
|
|
1 'Channel Autopilot' ${autoPilot} \ |
|
|
|
2 'Testnet' ${chainValue} \ |
|
|
|
3 ${dynDomainMenu} ${domainValue} \ |
|
|
@ -54,12 +54,14 @@ if [ ${dialogcancel} -eq 1 ]; then |
|
|
|
fi |
|
|
|
|
|
|
|
needsReboot=0 |
|
|
|
anychange=0 |
|
|
|
|
|
|
|
# AUTOPILOT process choice |
|
|
|
choice="off"; check=$(echo "${CHOICES}" | grep -c "1") |
|
|
|
if [ ${check} -eq 1 ]; then choice="on"; fi |
|
|
|
if [ "${autoPilot}" != "${choice}" ]; then |
|
|
|
echo "Autopilot Setting changed .." |
|
|
|
anychange=1 |
|
|
|
sudo /home/admin/config.scripts/lnd.autopilot.sh ${choice} |
|
|
|
needsReboot=1 |
|
|
|
else |
|
|
@ -74,6 +76,7 @@ if [ "${chain}" != "${choice}" ]; then |
|
|
|
dialog --title 'FAIL' --msgbox 'Litecoin-Testnet not available.' 5 25 |
|
|
|
else |
|
|
|
echo "Testnet Setting changed .." |
|
|
|
anychange=1 |
|
|
|
sudo /home/admin/config.scripts/network.chain.sh ${choice}net |
|
|
|
walletExists=$(sudo ls /mnt/hdd/lnd/data/chain/${network}/${choice}net/wallet.db 2>/dev/null | grep -c 'wallet.db') |
|
|
|
if [ ${walletExists} -eq 0 ]; then |
|
|
@ -143,6 +146,7 @@ choice="off"; check=$(echo "${CHOICES}" | grep -c "3") |
|
|
|
if [ ${check} -eq 1 ]; then choice="on"; fi |
|
|
|
if [ "${domainValue}" != "${choice}" ]; then |
|
|
|
echo "Dynamic Domain changed .." |
|
|
|
anychange=1 |
|
|
|
sudo /home/admin/config.scripts/internet.dyndomain.sh ${choice} |
|
|
|
needsReboot=1 |
|
|
|
else |
|
|
@ -154,6 +158,7 @@ choice="off"; check=$(echo "${CHOICES}" | grep -c "4") |
|
|
|
if [ ${check} -eq 1 ]; then choice="on"; fi |
|
|
|
if [ "${runBehindTor}" != "${choice}" ]; then |
|
|
|
echo "TOR Setting changed .." |
|
|
|
anychange=1 |
|
|
|
sudo /home/admin/config.scripts/internet.tor.sh ${choice} |
|
|
|
needsReboot=1 |
|
|
|
else |
|
|
@ -184,6 +189,7 @@ choice="off"; check=$(echo "${CHOICES}" | grep -c "6") |
|
|
|
if [ ${check} -eq 1 ]; then choice="on"; fi |
|
|
|
if [ "${autoUnlock}" != "${choice}" ]; then |
|
|
|
echo "LND Autounlock Setting changed .." |
|
|
|
anychange=1 |
|
|
|
sudo /home/admin/config.scripts/lnd.autounlock.sh ${choice} |
|
|
|
l1="AUTO-UNLOCK IS NOW OFF" |
|
|
|
if [ "${choice}" = "on" ]; then |
|
|
@ -198,6 +204,10 @@ else |
|
|
|
echo "LND Autounlock Setting unchanged." |
|
|
|
fi |
|
|
|
|
|
|
|
if [ ${anychange} -eq 1 ]; then |
|
|
|
dialog --pause "Use Spacebar to check/uncheck services." 8 58 5 |
|
|
|
fi |
|
|
|
|
|
|
|
if [ ${needsReboot} -eq 1 ]; then |
|
|
|
sleep 2 |
|
|
|
dialog --pause "OK. System will reboot to activate changes." 8 58 8 |
|
|
|