#!/bin/bash
set -e

WATCHDOG="$1"
shift

cd /app

# Injecter le bon PYTHONPATH
export PYTHONPATH=/app:$PYTHONPATH

# Lancer le watchdog avec un restart infini via supervisor deja gere
echo "Lancement du watchdog: $WATCHDOG"
exec python3 "$WATCHDOG" "$@"
