Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exit if rsync fails #6028

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Containers/nextcloud/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshtrichards I need help with this. What should happen if we actually exit here? should we just touch a file so that we can track this and then report that rsync fails? or what should be done?

set -e
rsync -rlD --delete --exclude-from=/upgrade.exclude "$SOURCE_LOCATION/" /var/www/html/

for dir in config data custom_apps themes; do
Expand All @@ -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
Expand Down