vpn configuration menu style
This commit is contained in:
parent
054f5a1d16
commit
6fd1d1a5ed
|
@ -201,27 +201,20 @@ function configure_interactive_vpn {
|
||||||
read_config_param VPN_TLS_PORT
|
read_config_param VPN_TLS_PORT
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
data=$(mktemp 2>/dev/null)
|
W=(1 $"Change TLS port (currently $VPN_TLS_PORT)"
|
||||||
dialog --backtitle $"Freedombone Control Panel" \
|
2 $"Regenerate keys for a user")
|
||||||
--title $"VPN Configuration" \
|
|
||||||
--radiolist $"Choose an operation:" 13 70 3 \
|
# shellcheck disable=SC2068
|
||||||
1 $"Change TLS port (currently $VPN_TLS_PORT)" off \
|
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"VPN" --menu $"Choose an operation, or ESC to exit:" 10 60 2 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||||
2 $"Regenerate keys for a user" off \
|
|
||||||
3 $"Exit" on 2> "$data"
|
if [ ! "$selection" ]; then
|
||||||
sel=$?
|
break
|
||||||
case $sel in
|
fi
|
||||||
1) rm -f "$data"
|
|
||||||
return;;
|
case $selection in
|
||||||
255) rm -f "$data"
|
|
||||||
return;;
|
|
||||||
esac
|
|
||||||
case $(cat "$data") in
|
|
||||||
1) vpn_change_tls_port;;
|
1) vpn_change_tls_port;;
|
||||||
2) vpn_regenerate_client_keys;;
|
2) vpn_regenerate_client_keys;;
|
||||||
3) rm -f "$data"
|
|
||||||
break;;
|
|
||||||
esac
|
esac
|
||||||
rm -f "$data"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue