#!/bin/bash
# 1. Standardize PATH for automation
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# 2. Provide Wasabi keys directly to this session
# This bypasses the need for an AWS profile file
export AWS_ACCESS_KEY_ID="X07Z3FM8CS0LPT3MJ1ZT"
export AWS_SECRET_ACCESS_KEY="XKkorNBnE0QY5PGWYsGdmt9Wqr96bk3geYjJaf5W"

# 3. Move to the directory containing resized images
cd /home/bonstphotos3/public_html/resizedImages1

# 4. Run the move command
# Note: --profile is removed because we are using the exported keys above
aws s3 mv ./ s3://nstphotos/ --recursive --endpoint-url=https://s3.wasabisys.com

# 5. Trigger the database update flag
/usr/bin/php /home/bonstphotos3/public_html/markWasabiComplete1.php