douyinWEB/scripts/_run_avatar_backfill.sh
eric d409e416da Ship physical dual-edge stack, Studio CDP live metrics, and ops tooling.
Capture Neko/WG/network hubs, Studio viewer charts, physical deploy docs, and one-shot scripts so VPS vs physical can be toggled later without losing WIP.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 22:42:40 -05:00

28 lines
776 B
Bash

#!/bin/bash
set -e
systemctl reset-failed douyinweb-api || true
systemctl start douyinweb-api
sleep 4
systemctl is-active douyinweb-api
ENVFILE=$(systemctl show douyinweb-api -p EnvironmentFiles --value | head -1 | cut -d: -f1 | tr -d ' ')
echo "ENVFILE=$ENVFILE"
if [ -n "$ENVFILE" ] && [ -f "$ENVFILE" ]; then
set -a
# shellcheck disable=SC1090
. "$ENVFILE"
set +a
fi
while IFS= read -r line; do
case "$line" in
DY_S3_*=*|S3_*=*) export "$line" ;;
esac
done < <(systemctl show douyinweb-api -p Environment --value | tr ' ' '\n')
echo "DY_S3_ENABLED=${DY_S3_ENABLED:-}"
echo "DY_S3_PUBLIC_BASE=${DY_S3_PUBLIC_BASE:-}"
cd /opt/douyinWEB/backend
PYTHONPATH=. .venv/bin/python /tmp/_diag_s3_settings.py
PYTHONPATH=. .venv/bin/python /tmp/_backfill_avatars.py