diff --git a/heartbeatd/in.heartbeatd b/heartbeatd/in.heartbeatd new file mode 100755 index 0000000..e991a6a --- /dev/null +++ b/heartbeatd/in.heartbeatd @@ -0,0 +1,8 @@ +#! /bin/sh + +case "$REMOTEADDR" in + 10.0.0.[2-254]) + touch /var/lib/pollster/$REMOTEADDR + ;; +esac + diff --git a/heartbeatd/run.heartbeat b/heartbeatd/run.heartbeat new file mode 100755 index 0000000..3e4f37e --- /dev/null +++ b/heartbeatd/run.heartbeat @@ -0,0 +1,9 @@ +#! /bin/sh + +# Busybox netcat doesn't support UDP unless you compile in desktop mode. +# No problem, traceroute can send a UDP packet too. +while true; do + # Apparently traceroute adds 1 to the base port (-p) + traceroute -m 2 -q 1 -p 8 10.0.0.1 + sleep 10 +done diff --git a/heartbeatd/run.heartbeatd b/heartbeatd/run.heartbeatd new file mode 100755 index 0000000..8241141 --- /dev/null +++ b/heartbeatd/run.heartbeatd @@ -0,0 +1,3 @@ +#! /bin/sh + +exec udpsvd 0 9 /usr/sbin/in.heartbeatd