From ab1256f14bd08d3d53aac5cf8de65e41fa0c8a53 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sun, 31 Mar 2024 03:01:42 +0200 Subject: [PATCH] update_nextcloud.sh: some changes in script output. --- update_nextcloud.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/update_nextcloud.sh b/update_nextcloud.sh index d5f5c5a..a5f47fb 100755 --- a/update_nextcloud.sh +++ b/update_nextcloud.sh @@ -944,12 +944,26 @@ blank_line # - Update Nextcloud # - echo "" -echo " Update Nextcloud" -su -c"${PHP_BIN} ${WEB_BASE_DIR}/htdocs/occ upgrade" -s /bin/bash $HTTP_USER +echo -e " Update Nextcloud\n" +su -c"${PHP_BIN} ${WEB_BASE_DIR}/htdocs/occ upgrade" -s /bin/bash $HTTP_USER +echo "" if [[ $? -eq 0 ]]; then info "Updating nextcloud core was successfully.." else - fatal "$(cat $log_file)" + error "Updating nextcloud core failed!" + + echo -e " Command was:" + echo -e " \033[33msu -c\"${PHP_BIN} ${WEB_BASE_DIR}/htdocs/occ upgrade\" -s /bin/bash $HTTP_USER\033[m" + echo "" + + 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 "Interrupted by user." fi # Set maintenace mode to 'off'.. !!