Skip to content

Commit

Permalink
add debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticroentgen committed Jan 24, 2024
1 parent 1fd1074 commit 68703e0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mirror-s3.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/sh
DEBUG=""

if [[ "$MINIO_DEBUG" == "1" ]]; then
echo "== DEBUG ENABLED =="
DEBUG="--debug"
fi


echo "Adding S3 source..."
/usr/bin/mc alias set s3_source ${SOURCE_ENDPOINT} ${SOURCE_ACCESS_KEY} ${SOURCE_SECRET_KEY}
Expand All @@ -7,4 +14,4 @@ echo "Adding S3 destination..."
/usr/bin/mc alias set s3_destination ${DESTINATION_ENDPOINT} ${DESTINATION_ACCESS_KEY} ${DESTINATION_SECRET_KEY}

echo "Start mirror..."
/usr/bin/mc mirror --overwrite ${MINIO_EXTRA_OPTS} s3_source/${SOURCE_BUCKET} s3_destination/${DESTINATION_BUCKET} && curl ${HEALTHCHECK_URL}
/usr/bin/mc ${DEBUG} mirror --overwrite ${MINIO_EXTRA_OPTS} s3_source/${SOURCE_BUCKET} s3_destination/${DESTINATION_BUCKET} && curl ${HEALTHCHECK_URL}

0 comments on commit 68703e0

Please sign in to comment.