Files
homelab-docs/homelab/vpn-route-check/entrypoint.sh
2026-02-23 16:47:17 +03:00

12 lines
495 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/sh
set -e
# Сначала поднимаем HTTP, чтобы страница была доступна даже при сбое проверки
python3 /app/serve_no_cache.py &
# Первый запуск проверки (при ошибке не выходим — сервер уже слушает)
python3 /app/check_routes.py /data || true
# Каждые 15 минут обновляем данные
while true; do
sleep 900
python3 /app/check_routes.py /data || true
done