keyserver configuration menu style

This commit is contained in:
Bob Mottram 2018-04-04 13:09:50 +01:00
parent 7f027206e6
commit d48edfc5f5
1 changed files with 12 additions and 19 deletions

View File

@ -531,31 +531,24 @@ function keyserver_remove_key {
} }
function configure_interactive_keyserver { function configure_interactive_keyserver {
W=(1 $"Remove a key"
2 $"Sync with other keyserver"
3 $"Edit sync keyservers")
while true while true
do do
data=$(mktemp 2>/dev/null) # shellcheck disable=SC2068
dialog --backtitle $"Freedombone Control Panel" \ selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"SKS Keyserver" --menu $"Choose an operation, or ESC to exit:" 11 60 3 "${W[@]}" 3>&2 2>&1 1>&3)
--title $"SKS Keyserver" \
--radiolist $"Choose an operation:" 12 70 4 \ if [ ! "$selection" ]; then
1 $"Remove a key" off \ break
2 $"Sync with other keyserver" off \ fi
3 $"Edit sync keyservers" off \
4 $"Exit" on 2> "$data" case $selection in
sel=$?
case $sel in
1) rm -f "$data"
return;;
255) rm -f "$data"
return;;
esac
case $(cat "$data") in
1) keyserver_remove_key;; 1) keyserver_remove_key;;
2) keyserver_sync;; 2) keyserver_sync;;
3) keyserver_edit;; 3) keyserver_edit;;
4) rm -f "$data"
break;;
esac esac
rm -f "$data"
done done
} }