#!/usr/bin/env bash # CONTROL: hunting pilot, NO memory probe at all. The only question is whether # the guest still stalls when nothing is scanning /dev/shm alongside it. set -u export HOME=/sylph-home/re SDL_AUDIODRIVER=dummy DISPLAY=:98 export PYTHONPATH=/sylph-home/.local/lib/python3.12/site-packages SD="$(cd "$(dirname "$0")" && pwd)" SECS="${1:-300}" CFG=/tmp/nav-ctl.json "$SD/launch_mission.sh" fly || { echo "BOOT FAILED"; exit 1; } if python3 "$SD/entities2.py" self 0x130 "$CFG" >/dev/null 2>&1; then SYLPH_HUNT=1 SYLPH_KILL_TURRETS=1 SYLPH_KEEPOUT=1400 \ nohup python3 "$SD/pilot.py" "$CFG" "$SECS" /tmp/ctl-pilot.log 2>&1 & PILOT=$!; echo "--- pilot only, no probe" else echo "BIND FAILED"; exit 1; fi python3 -c "import time,sys; time.sleep(int(sys.argv[1]))" "$SECS" kill "$PILOT" 2>/dev/null echo "CONTROL DONE"