#!/bin/sh
# Background IN watch — BCM 9,10,11,2 (not OUT pair 3/8).
set -eu
cd /home/topbox/EtherGold/sync
pkill -f '/home/topbox/EtherGold/sync/hs_in_watch.py' 2>/dev/null || true
sleep 0.3
nohup sudo -n python3 /home/topbox/EtherGold/sync/hs_in_watch.py \
  --bcms 9,10,11,2 --poll-ms 1 \
  >/tmp/hs_in_watch.log 2>&1 &
echo "started pid=$! (IN candidates BCM 9/10/11/2)"
sleep 1
head -30 /tmp/hs_in_watch.log
pgrep -af hs_in_watch.py || echo "NOT RUNNING"
echo "tail: tail -f /tmp/hs_in_watch.log"
