From ce5ae28ec5f4e958f7ae991eff8d7e29284c4c7d Mon Sep 17 00:00:00 2001 From: marhode Date: Fri, 18 Aug 2023 14:23:47 +0200 Subject: [PATCH] experimental change for performance improvement --- moodleUpdateCheck.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/moodleUpdateCheck.sh b/moodleUpdateCheck.sh index ae4a5a1..12ddd19 100644 --- a/moodleUpdateCheck.sh +++ b/moodleUpdateCheck.sh @@ -76,7 +76,7 @@ else rm -r /bitnami/moodledata/moodle-backup fi mkdir -p /bitnami/moodledata/moodle-backup - cp -rp /bitnami/moodle/* /bitnami/moodledata/moodle-backup + mv /bitnami/moodle/* /bitnami/moodledata/moodle-backup else echo "=== Maintenance Mode already active, skipping internal backup ===" fi @@ -133,7 +133,7 @@ else chown -R 1001:root /bitnami/moodledata/* rm -rf /bitnami/moodle/* && echo "=== Old moodle deleted ===" - cp -rp /bitnami/moodledata/updated-moodle/* /bitnami/moodle/ && echo "=== New moodle version copied to folder ===" + mv /bitnami/moodledata/updated-moodle/* /bitnami/moodle/ && echo "=== New moodle version copied to folder ===" # cp /bitnami/moodledata/moodle-backup/config.php /bitnami/moodle/config.php # # plugin list - one could generate a diff and use that list # echo "=== Move plugins to updated installation ===" @@ -156,7 +156,7 @@ else else #If no moodle Version was found we fall back to previous version echo "=== Update failed, no Moodle Version detected fallback to old Version ===" - cp -rp /bitnami/moodledata/moodle-backup/* /bitnami/moodle/ && echo "=== Old moodle version restored to folder ===" + mv /bitnami/moodledata/moodle-backup/* /bitnami/moodle/ && echo "=== Old moodle version restored to folder ===" touch /bitnami/moodledata/UpdateFailed sleep 5 start_moodle