mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-20 18:22:01 +01:00
#1253 support cancel
This commit is contained in:
parent
f34a049ee3
commit
9c81c612f9
@ -390,8 +390,16 @@ if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${zerotier}" != "${choice}" ]; then
|
||||
echo "zerotier setting changed .."
|
||||
anychange=1
|
||||
sudo -u admin /home/admin/config.scripts/bonus.zerotier.sh ${choice}
|
||||
dialog --msgbox "ZeroTier is now ${choice}." 5 46
|
||||
error=""
|
||||
source <(sudo -u admin /home/admin/config.scripts/bonus.zerotier.sh ${choice})
|
||||
if [ ${#error} -eq 0 ]; then
|
||||
dialog --msgbox "ZeroTier is now ${choice}." 5 46
|
||||
else
|
||||
if [ "${error}" != "cancel" ]; then
|
||||
dialog --msgbox "ZeroTier Error:\n${error}" 5 46
|
||||
fi
|
||||
fi
|
||||
|
||||
else
|
||||
echo "ZeroTier setting unchanged."
|
||||
fi
|
||||
|
@ -47,7 +47,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
networkID=$(whiptail --inputbox "\nPlease enter the ZeroTier networkID to connect to:" 10 38 "" --title " Join ZeroTier Network " --backtitle "RaspiBlitz - Settings" 3>&1 1>&2 2>&3)
|
||||
networkID=$(echo "${networkID[0]}")
|
||||
if [ ${#networkID} -eq 0 ]; then
|
||||
echo "# no id entered - cancel"
|
||||
echo "error='cancel'"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user