From 35383599ec3b23aa943f01df8c5e726210a3fab9 Mon Sep 17 00:00:00 2001 From: Christoph Date: Fri, 10 Dec 2021 03:19:47 +0100 Subject: [PATCH] update_nextcloud.sh: some minor changes. --- update_nextcloud.sh | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/update_nextcloud.sh b/update_nextcloud.sh index ef7cb3d..a76ffeb 100755 --- a/update_nextcloud.sh +++ b/update_nextcloud.sh @@ -576,6 +576,7 @@ CURRENT_INSTALL_DIR="$(realpath ${WEB_BASE_DIR}/nextcloud)" #PRIOR_VERSION="$(basename $CURRENT_INSTALL_DIR | cut -d"-" -f2)" PRIOR_VERSION="$(sudo -u $HTTP_USER /usr/local/php/bin/php ${WEB_BASE_DIR}/htdocs/occ --version | cut -d' ' -f2)" +PRIOR_VERSION=23.0.0 #DATA_DIR=${WEB_BASE_DIR}/data-${VERSION} #CURRENT_DATA_DIR="$(realpath ${WEB_BASE_DIR}/data-$PRIOR_VERSION)" @@ -887,7 +888,16 @@ if [[ $? -eq 0 ]]; then echo_ok else echo_failed - fatal "$(cat $log_file)" + error "$(cat $log_file)" + + 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 # - Synchronisiere neues Installationsverzeichnis mit @@ -899,7 +909,16 @@ if [[ $? -eq 0 ]]; then echo_ok else echo_failed - fatal "$(cat $log_file)" + error "$(cat $log_file)" + + 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 echononl " Set actual date on directory '${INSTALL_DIR}'.." @@ -1032,6 +1051,7 @@ else fatal "$(cat $log_file)" fi + # - Update Nextcloud # - echo ""