From 28b0fcdce7ebdabfda1e9167b7e00d81d2abb537 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 24 Apr 2022 04:14:46 -0400 Subject: [PATCH] Create internet-check.sh --- misc/internet-check.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 misc/internet-check.sh 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