From 9893bd4371baf2693c573f8ab8934c4d8d9d477c Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 29 Mar 2025 03:06:33 +0100 Subject: [PATCH] restore_nextcloud.sh: some changes in error handling. --- restore_nextcloud.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/restore_nextcloud.sh b/restore_nextcloud.sh index c3e7eae..21226ae 100755 --- a/restore_nextcloud.sh +++ b/restore_nextcloud.sh @@ -615,7 +615,7 @@ if [[ "$DATABASE_TYPE" = 'mysql' ]]; then if $_failed ; then echo_failed - error "$(cat $log_file)" + error "\n\n$(cat $log_file)" if [[ ${#_tables_not_deleted[@]} -gt 0 ]] ; then echo "" @@ -625,9 +625,21 @@ if [[ "$DATABASE_TYPE" = 'mysql' ]]; then done echo "" fi - else - echo_ok - fi + + + echononl "continue anyway [yes/no]: " + read OK + OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')" + while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do + echononl "Wrong entry! - repeat [yes/no]: " + read OK + done + [[ $OK = "yes" ]] || fatal "Abbruch durch User" + blank_line + + else + echo_ok + fi fi