From e4cbda1da43f6dd46a0e7a6a8e7ad83e7b8365e5 Mon Sep 17 00:00:00 2001 From: Christian Rotzoll Date: Fri, 14 Jun 2019 00:22:27 +0200 Subject: [PATCH] options array --- home.admin/00settingsMenuServices.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/home.admin/00settingsMenuServices.sh b/home.admin/00settingsMenuServices.sh index 510cc0b20..8bf957489 100644 --- a/home.admin/00settingsMenuServices.sh +++ b/home.admin/00settingsMenuServices.sh @@ -36,16 +36,18 @@ fi # show select dialog echo "run dialog ..." -CHOICES=$(dialog --title ' Additional Services ' --checklist ' use spacebar to activate/de-activate ' 15 45 8 \ -1 'Channel Autopilot' ${autoPilot} \ +OPTIONS+=(1 'Channel Autopilot' ${autoPilot} \ 2 'Testnet' ${chainValue} \ 3 ${dynDomainMenu} ${domainValue} \ 4 'Run behind TOR' ${runBehindTor} \ 5 'RTL Webinterface' ${rtlWebinterface} \ 6 'LND Auto-Unlock' ${autoUnlock} \ -7 'BTC UPnP (AutoNAT)' ${networkUPnP} \ -8 'LND UPnP (AutoNAT)' ${autoNatDiscovery} \ -2>&1 >/dev/tty) +) +if [ "${runBehindTor}" = "off" ]; then + OPTIONS+=(7 'BTC UPnP (AutoNAT)' ${networkUPnP} \ +8 'LND UPnP (AutoNAT)' ${autoNatDiscovery}) +fi +CHOICES=$(dialog --title ' Additional Services ' --checklist ' use spacebar to activate/de-activate ' 15 45 8 ${OPTIONS[@]} 2>&1 >/dev/tty) dialogcancel=$? echo "done dialog" clear