
To the bone
Leave a reply

The smallest dog barks the loudest.
#!/bin/bash
x=`ping -c1 google.com 2>&1 | grep unknown`
if [ ! "$x" = "" ]; then
echo "It's down!! Attempting to restart."
service network restart
fi
# you can swap "service network restart" with "netplan apply" depending on your linux distro.