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

# 2. Wasabi Keys
export AWS_ACCESS_KEY_ID="X07Z3FM8CS0LPT3MJ1ZT"
export AWS_SECRET_ACCESS_KEY="XKkorNBnE0QY5PGWYsGdmt9Wqr96bk3geYjJaf5W"

# 3. Move to the images folder and do the upload
cd /home/bonstphotos3/public_html/resizedImages1
aws s3 mv ./ s3://nstphotos/ --recursive --endpoint-url=https://s3.wasabisys.com

# 4. CRITICAL: Move back to the root folder so PHP can find common.php
cd /home/bonstphotos3/public_html/

# 5. Run the update using the path that worked in your terminal
/usr/local/bin/php markWasabiComplete1.php >> /home/bonstphotos3/public_html/logs/wasabi_debug.log 2>&1