Is there any way to run a script on lost Internet connection, for example when the WAN goes down and up and run a bash script to send a notification to my local server.
WAN Down: /lost.sh curl Internet connectivity lost
WAN UP: /restored.sh curl Internet connectivity restored