mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-03-01 00:59:23 +01:00
switch to dialog inputbox for zerotier (#4464)
This commit is contained in:
parent
0592776504
commit
0720b0c2a8
1 changed files with 23 additions and 13 deletions
|
@ -40,9 +40,19 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||
|
||||
networkID=$2
|
||||
if [ ${#networkID} -eq 0 ]; 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
|
||||
trap 'rm -f "$_temp"' EXIT
|
||||
_temp=$(mktemp -p /dev/shm/)
|
||||
|
||||
dialog --backtitle "RaspiBlitz - Settings" \
|
||||
--title "Join ZeroTier Network" \
|
||||
--inputbox "\nPlease enter the ZeroTier networkID to connect to:" 10 60 2>"$_temp"
|
||||
|
||||
networkID=$(cat "$_temp")
|
||||
|
||||
# Remove temporary file explicitly, though it's also handled by the EXIT trap
|
||||
rm -f "$_temp"
|
||||
|
||||
if [ -z "$networkID" ]; then
|
||||
echo "error='cancel'"
|
||||
exit 0
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue