3x-ui/docker-cron-runner/cron-job-script.sh

16 lines
403 B
Bash
Raw Normal View History

#!/usr/bin/env sh
set -eu
echo "[$(date)] Starting geodata update..."
2026-01-18 18:15:31 +00:00
/app/geo.sh update_all_geofiles "${SHARED_VOLUME_PATH}"
echo "[$(date)] Geodata update finished, restarting container..."
HTTP_CODE=$(
curl -s -X POST \
"${DOCKER_PROXY_URL}/containers/${TARGET_CONTAINER_NAME}/restart" \
-o /dev/null -w "%{http_code}"
)
echo "[$(date)] Restart request sent, HTTP status: ${HTTP_CODE}"