s3.sh: set AWS_EC2_METADATA_DISABLED=true (fix #183)

Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
This commit is contained in:
Shengqi Chen 2025-04-14 17:20:24 +08:00
parent d70a4ba893
commit 51c4aa4500
No known key found for this signature in database

3
s3.sh
View File

@ -6,6 +6,9 @@ else
ENDPOINT=""
fi
# see tuna/tunasync-scripts#183
export AWS_EC2_METADATA_DISABLED=true
[[ ! -d "${TUNASYNC_WORKING_DIR}" ]] && mkdir -p "${TUNASYNC_WORKING_DIR}"
mkdir /tmp/none; cd /tmp/none # enter an empty folder, so the stars in TUNASYNC_AWS_OPTIONS are not expanded
exec aws --no-sign-request ${ENDPOINT} s3 sync --exact-timestamps ${TUNASYNC_AWS_OPTIONS} "${TUNASYNC_UPSTREAM_URL}" "${TUNASYNC_WORKING_DIR}"