From 4842fc19f2a4001de6873ba6b8c360e956dadcb3 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Tue, 11 Feb 2025 15:34:15 +0100 Subject: [PATCH] exit if rsync fails Signed-off-by: Simon L. --- Containers/nextcloud/entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index c97a56f9..7613f92a 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -217,6 +217,8 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then fi echo "Initializing nextcloud $image_version ..." + # TODO: touch rsync file to track what happens so that the container does not continue restarting? (it is not known what happens if it fails here at this step) + set -e rsync -rlD --delete --exclude-from=/upgrade.exclude "$SOURCE_LOCATION/" /var/www/html/ for dir in config data custom_apps themes; do @@ -226,6 +228,7 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then done rsync -rlD --delete --include '/config/' --exclude '/*' --exclude '/config/CAN_INSTALL' --exclude '/config/config.sample.php' --exclude '/config/config.php' "$SOURCE_LOCATION/" /var/www/html/ rsync -rlD --include '/version.php' --exclude '/*' "$SOURCE_LOCATION/" /var/www/html/ + set +e echo "Initializing finished" #install