From 0e76bdba94ed6d0dd3e4109f3aa5c0a6e587bf40 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 5 Oct 2022 16:19:59 +0800 Subject: [PATCH] fixed check update available bug --- check_update.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/check_update.sh b/check_update.sh index defc9cf..270e472 100755 --- a/check_update.sh +++ b/check_update.sh @@ -2,6 +2,18 @@ sleep 120 +internet="offline" + +wget -q --spider http://google.com + +if [ $? -eq 0 ]; then + internet="online" +else + internet="offline" +fi + + +if [[ $internet = "online" ]]; then value=$(> csv/system_info.json sudo chmod 777 csv/system_info.json - +fi