Files
nexus/tools/pi_control/worker_entry.sh
2026-03-07 00:25:15 +01:00

18 lines
311 B
Bash

#!/usr/bin/env sh
set -eu
APP_ENV="${APP_ENV:-staging}"
if [ "$APP_ENV" = "live" ]; then
SCRIPT="/app/live/tools/pi_control/pi_worker.php"
else
SCRIPT="/app/staging/tools/pi_control/pi_worker.php"
fi
if [ ! -f "$SCRIPT" ]; then
echo "pi_worker.php not found at $SCRIPT"
exit 1
fi
exec php "$SCRIPT"