Browse Source

#400 autoNAT added to Service menu

v1.3
Christian Rotzoll 6 years ago
parent
commit
315ee8bb56
  1. 46
      home.admin/00settingsMenuServices.sh

46
home.admin/00settingsMenuServices.sh

@ -11,7 +11,7 @@ if [ ${#autoUnlock} -eq 0 ]; then autoUnlock="off"; fi
if [ ${#runBehindTor} -eq 0 ]; then runBehindTor="off"; fi
if [ ${#rtlWebinterface} -eq 0 ]; then rtlWebinterface="off"; fi
if [ ${#chain} -eq 0 ]; then chain="main"; fi
if [ ${#backupTorrentSeeding} -eq 0 ]; then backupTorrentSeeding="off"; fi
if [ ${#autoNatDiscovery} -eq 0 ]; then autoNatDiscovery="off"; fi
echo "map chain to on/off"
chainValue="off"
@ -42,7 +42,7 @@ CHOICES=$(dialog --title ' Additional Services ' --checklist ' use spacebar to a
4 'Run behind TOR' ${runBehindTor} \
5 'RTL Webinterface' ${rtlWebinterface} \
6 'LND Auto-Unlock' ${autoUnlock} \
7 'Backup Torrent Seeding' ${backupTorrentSeeding} \
7 'AutoNAT / UPnP' ${autoNatDiscovery} \
2>&1 >/dev/tty)
dialogcancel=$?
echo "done dialog"
@ -215,47 +215,23 @@ else
echo "LND Autounlock Setting unchanged."
fi
# Backup Torrent Seeding
# AutoNAT
choice="off"; check=$(echo "${CHOICES}" | grep -c "7")
if [ ${check} -eq 1 ]; then choice="on"; fi
if [ "${backupTorrentSeeding}" != "${choice}" ]; then
echo "BACKUP TORRENT SEEDING Setting changed .."
if [ "${autoNatDiscovery}" != "${choice}" ]; then
echo "AUTO NAT Setting changed .."
anychange=1
if [ "${choice}" = "on" ]; then
whiptail --title "Experimental Feature" --yes-button "Activate" --no-button "Dont Activate" --yesno "The Backup Torrent Seeding is still a very early
experimental feature and could compromise your
Lightning Node stability.
Are you sure that you want to activate it?
" 11 54
if [ $? -eq 0 ]; then
/home/admin/50torrentHDD.sh backup-torrent-hosting
dialog --backtitle "RaspiBlitz Settings" --title " OK " --msgbox "
BACKUP TORRENT SEEDING IS NOW ACTIVE
-------------------------------------
If possible forward ports 49200-49250
from your router to this RaspiBlitz.
During initial torrent download your
RaspiBlitz can be slow.
" 13 42
else
echo
echo "Skipping Backup Torrent Seeding ..."
echo
sleep 3
fi
echo "Starting autoNAT ..."
/home/admin/config.scripts/lnd.autonat.sh on
needsReboot=1
else
echo "Stopping Torrents and Cleaning Up ..."
/home/admin/50torrentHDD.sh cleanup
echo "BACKUP TORRENT SEEDING IS NOW OFF"
echo "Stopping autoNAT ..."
/home/admin/config.scripts/lnd.autonat.sh off
needsReboot=1
fi
else
echo "LND Autounlock Setting unchanged."
echo "LND AUTONAT Setting unchanged."
fi
if [ ${anychange} -eq 0 ]; then

Loading…
Cancel
Save