diff --git a/misc/internet-check.sh b/misc/internet-check.sh new file mode 100644 index 00000000..4edeb0b4 --- /dev/null +++ b/misc/internet-check.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash -ex +wget -q --tries=10 --timeout=5 --spider http://google.com +if [[ $? -eq 0 ]]; then + echo -e "Internet Online" +else + echo -e "Internet Offline" +fi