diff --git a/live/operator-session/clawdie-join-hive.sh b/live/operator-session/clawdie-join-hive.sh index d531a519..f27eaced 100755 --- a/live/operator-session/clawdie-join-hive.sh +++ b/live/operator-session/clawdie-join-hive.sh @@ -155,6 +155,19 @@ if provider_env_has_bw_creds; then sleep 1 _t=$(( _t + 1 )) done + # Confirm the auto-spawned Pi came up (colibri auto-spawn on boot). + if have colibri; then + _p=0 + while [ "$_p" -lt 10 ]; do + if colibri --socket "$SOCKET" status 2>/dev/null | grep -q '"agents":[1-9]'; then + echo " Pi agent is live." + break + fi + sleep 1 + _p=$(( _p + 1 )) + done + [ "$_p" -lt 10 ] || echo " NOTE: no Pi agent yet — check: colibri status" + fi else echo " WARNING: daemon restart failed." echo " Run: mdo -u root service colibri_daemon restart"