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 [ ${#runBehindTor} -eq 0 ]; then runBehindTor="off"; fi
if [ ${#rtlWebinterface} -eq 0 ]; then rtlWebinterface="off"; fi if [ ${#rtlWebinterface} -eq 0 ]; then rtlWebinterface="off"; fi
if [ ${#chain} -eq 0 ]; then chain="main"; 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" echo "map chain to on/off"
chainValue="off" chainValue="off"
@ -42,7 +42,7 @@ CHOICES=$(dialog --title ' Additional Services ' --checklist ' use spacebar to a
4 'Run behind TOR' ${runBehindTor} \ 4 'Run behind TOR' ${runBehindTor} \
5 'RTL Webinterface' ${rtlWebinterface} \ 5 'RTL Webinterface' ${rtlWebinterface} \
6 'LND Auto-Unlock' ${autoUnlock} \ 6 'LND Auto-Unlock' ${autoUnlock} \
7 'Backup Torrent Seeding' ${backupTorrentSeeding} \ 7 'AutoNAT / UPnP' ${autoNatDiscovery} \
2>&1 >/dev/tty) 2>&1 >/dev/tty)
dialogcancel=$? dialogcancel=$?
echo "done dialog" echo "done dialog"
@ -215,47 +215,23 @@ else
echo "LND Autounlock Setting unchanged." echo "LND Autounlock Setting unchanged."
fi fi
# Backup Torrent Seeding # AutoNAT
choice="off"; check=$(echo "${CHOICES}" | grep -c "7") choice="off"; check=$(echo "${CHOICES}" | grep -c "7")
if [ ${check} -eq 1 ]; then choice="on"; fi if [ ${check} -eq 1 ]; then choice="on"; fi
if [ "${backupTorrentSeeding}" != "${choice}" ]; then if [ "${autoNatDiscovery}" != "${choice}" ]; then
echo "BACKUP TORRENT SEEDING Setting changed .." echo "AUTO NAT Setting changed .."
anychange=1 anychange=1
if [ "${choice}" = "on" ]; then if [ "${choice}" = "on" ]; then
echo "Starting autoNAT ..."
whiptail --title "Experimental Feature" --yes-button "Activate" --no-button "Dont Activate" --yesno "The Backup Torrent Seeding is still a very early /home/admin/config.scripts/lnd.autonat.sh on
experimental feature and could compromise your needsReboot=1
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
else else
echo "Stopping Torrents and Cleaning Up ..." echo "Stopping autoNAT ..."
/home/admin/50torrentHDD.sh cleanup /home/admin/config.scripts/lnd.autonat.sh off
echo "BACKUP TORRENT SEEDING IS NOW OFF"
needsReboot=1 needsReboot=1
fi fi
else else
echo "LND Autounlock Setting unchanged." echo "LND AUTONAT Setting unchanged."
fi fi
if [ ${anychange} -eq 0 ]; then if [ ${anychange} -eq 0 ]; then

Loading…
Cancel
Save