Skip to content
Snippets Groups Projects
Commit 1e1134ff authored by Bob Mottram's avatar Bob Mottram
Browse files

xmpp configuration menu style

parent 6fd1d1a5
No related branches found
No related tags found
No related merge requests found
......@@ -181,29 +181,22 @@ function xmpp_remove_onion_address_interactive {
}
function configure_interactive_xmpp {
W=(1 $"Add an ICANN to onion domain mapping"
2 $"Remove an ICANN to onion domain mapping")
while true
do
data=$(mktemp 2>/dev/null)
dialog --backtitle $"Freedombone Control Panel" \
--title $"XMPP" \
--radiolist $"Choose an operation:" 12 70 3 \
1 $"Add an ICANN to onion domain mapping" off \
2 $"Remove an ICANN to onion domain mapping" off \
3 $"Return to administrator control panel" on 2> "$data"
sel=$?
case $sel in
1) rm -f "$data"
return;;
255) rm -f "$data"
return;;
esac
case $(cat "$data") in
# shellcheck disable=SC2068
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"XMPP" --menu $"Choose an operation, or ESC to exit:" 10 60 2 "${W[@]}" 3>&2 2>&1 1>&3)
if [ ! "$selection" ]; then
break
fi
case $selection in
1) xmpp_add_onion_address_interactive;;
2) xmpp_remove_onion_address_interactive;;
3) rm -f "$data"
break;;
esac
rm -f "$data"
done
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment