diff --git a/src/freedombone-app-hubzilla b/src/freedombone-app-hubzilla index 20aaccbc..73c902ea 100755 --- a/src/freedombone-app-hubzilla +++ b/src/freedombone-app-hubzilla @@ -138,27 +138,22 @@ function hubzilla_channel_directory_server { } function configure_interactive_hubzilla { + W=(1 $"Set channel directory server" + 2 $"Renew SSL certificate") + while true do - data=$(mktemp 2>/dev/null) - dialog --backtitle $"Freedombone Control Panel" \ - --title $"Hubzilla" \ - --radiolist $"Choose an operation:" 13 70 4 \ - 1 $"Set channel directory server" off \ - 2 $"Renew SSL certificate" off \ - 3 $"Back to main menu" on 2> "$data" - sel=$? - case $sel in - 1) break;; - 255) break;; - esac - case $(cat "$data") in + # shellcheck disable=SC2068 + selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Hubzilla" --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) hubzilla_channel_directory_server;; 2) hubzilla_renew_cert;; - 3) rm -f "$data" - break;; esac - rm -f "$data" done }