From ae2395f86bafb55d2c3d115aaae93452194f9179 Mon Sep 17 00:00:00 2001 From: th33xitus Date: Sun, 3 Apr 2022 15:39:42 +0200 Subject: [PATCH] fix(moonraker.sh): bug in instance confirmation Signed-off-by: Dominik Willner th33xitus@gmail.com --- scripts/moonraker.sh | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/scripts/moonraker.sh b/scripts/moonraker.sh index b3cf73c..905f7a0 100644 --- a/scripts/moonraker.sh +++ b/scripts/moonraker.sh @@ -80,21 +80,23 @@ function moonraker_setup_dialog(){ error_msg "Invalid Input!\n" else echo - read -p "${cyan}###### Install ${count} instance(s)? (Y/n):${default} " yn - case "${yn}" in - Y|y|Yes|yes|"") - select_msg "Yes" - status_msg "Installing ${count} Moonraker instance(s) ... \n" - moonraker_setup "${count}" - break;; - N|n|No|no) - select_msg "No" - error_msg "Exiting Moonraker setup ...\n" - break;; - *) - print_error "Invalid command!" - ;; - esac + while true; do + read -p "${cyan}###### Install ${count} instance(s)? (Y/n):${default} " yn + case "${yn}" in + Y|y|Yes|yes|"") + select_msg "Yes" + status_msg "Installing ${count} Moonraker instance(s) ... \n" + moonraker_setup "${count}" + break;; + N|n|No|no) + select_msg "No" + error_msg "Exiting Moonraker setup ...\n" + break;; + *) + error_msg "Invalid Input!\n" + ;; + esac + done fi done }