Detect when a WAN is down (does not have internet access) to launch a script?
dwr953topfsense last edited by
I want to know how I can detect when a WAN is down (down meaning it has no internet access thru that interface) and then if detected, launch a personal script.
Mr_AJ last edited by
You something like this
Or a bash script like this .....
if curl -s --head --request GET https://example.com | grep "200 OK" > /dev/null; then echo "mysite.com is UP" else echo "mysite.com is DOWN" fi