Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

412 B
Raw Blame
#!/bin/sh
# Publish a tiny state file on network events; no extra resident network monitor.
set -eu
state=$(LC_ALL=C nmcli -t -f STATE general)
temporary=$(mktemp /run/harness-network.XXXXXX)
trap 'rm -f "$temporary"' EXIT
if [ "$state" = connected ]; then
    printf '%s\n' connected > "$temporary"
else
    printf '%s\n' offline > "$temporary"
fi
chmod 644 "$temporary"
mv -f "$temporary" /run/harness-network