diff --git a/src/freedombone-app-tahoelafs b/src/freedombone-app-tahoelafs index 4d37e489..78e7b671 100755 --- a/src/freedombone-app-tahoelafs +++ b/src/freedombone-app-tahoelafs @@ -188,27 +188,25 @@ function edit_tahoelafs_shares { } function configure_interactive_tahoelafs { - data=$(mktemp 2>/dev/null) - dialog --backtitle $"Freedombone Configuration" \ - --title $"Tahoe-LAFS" \ - --radiolist $"The least authority is always the best" 11 50 5 \ - 1 "Add a storage node" off \ - 2 "Manually edit storage nodes" off \ - 3 "Shares settings" off \ - 4 "Back to main menu" on 2> "$data" - sel=$? - case $sel in - 1) rm -f "$data" - exit 1;; - 255) rm -f "$data" - exit 1;; - esac - case $(cat "$data") in - 1) add_tahoelafs_storage_node_interactive;; - 2) edit_tahoelafs_nodes;; - 3) edit_tahoelafs_shares;; - esac - rm -f "$data" + W=(1 $"Add a storage node" + 2 $"Manually edit storage nodes" + 3 $"Shares settings") + + while true + do + # shellcheck disable=SC2068 + selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Tahoe-LAFS" --menu $"Choose an operation, or ESC to exit:" 12 60 3 "${W[@]}" 3>&2 2>&1 1>&3) + + if [ ! "$selection" ]; then + break + fi + + case $selection in + 1) add_tahoelafs_storage_node_interactive;; + 2) edit_tahoelafs_nodes;; + 3) edit_tahoelafs_shares;; + esac + done } function tahoelafs_setup_client_config {