I tried it out with the box hosting the VPNs for us and it works great for just checking to see if the box is up and rebooting if not. We just tested it running it and unplugging the WAN. On the WRAP I tried this on though, the /var/db/hosts file was cleared on reboot. I made something in /usr/local/etc/rc.d recreate it though.
The only problem is that I guess I have the syntax right. For just checking up and down, it works fine though.
Here's the error I get:
PROCESSING 192.168.75.7|4.2.2.2|10|/tmp/shutdown.sh|/tmp/up.sh|999|999
Processing 4.2.2.2
PING 4.2.2.2 (4.2.2.2) from 192.168.75.7: 56 data bytes
64 bytes from 4.2.2.2: icmp_seq=0 ttl=247 time=16.167 ms
64 bytes from 4.2.2.2: icmp_seq=1 ttl=247 time=15.761 ms
64 bytes from 4.2.2.2: icmp_seq=2 ttl=247 time=16.309 ms
64 bytes from 4.2.2.2: icmp_seq=3 ttl=247 time=18.847 ms
64 bytes from 4.2.2.2: icmp_seq=4 ttl=247 time=25.969 ms
64 bytes from 4.2.2.2: icmp_seq=5 ttl=247 time=26.756 ms
64 bytes from 4.2.2.2: icmp_seq=6 ttl=247 time=14.858 ms
64 bytes from 4.2.2.2: icmp_seq=7 ttl=247 time=23.865 ms
64 bytes from 4.2.2.2: icmp_seq=8 ttl=247 time=14.006 ms
64 bytes from 4.2.2.2: icmp_seq=9 ttl=247 time=14.264 ms
–- 4.2.2.2 ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max/stddev = 14.006/18.680/26.756/4.708 ms
Checking ping time 4.2.2.2
Ping returned 0
[: 18.664: bad number
Checking wan ping time nan
[: nan: bad number
but yeah, that script is hella useful for OpenVPN tunnels. Maybe it'll fix the tunnel dying problem we're having