Skip to content

Commit

Permalink
experimental change for performance improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
marhode committed Aug 18, 2023
1 parent 62235a4 commit ce5ae28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions moodleUpdateCheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ==="
Expand All @@ -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
Expand Down

0 comments on commit ce5ae28

Please sign in to comment.