From c118eebbf4bfad1eac7b11c738db24ef67bd0fc9 Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Sun, 13 Oct 2019 11:22:32 -0300 Subject: [PATCH] Waits to make sure the system will be full reliable before running --- Services/fixInternetAfterSleep.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Services/fixInternetAfterSleep.sh b/Services/fixInternetAfterSleep.sh index 5a9de9b..2f7323f 100755 --- a/Services/fixInternetAfterSleep.sh +++ b/Services/fixInternetAfterSleep.sh @@ -1,3 +1,4 @@ +sleep 30 if ! ping -q -c 1 -W 1 8.8.8.8 >/dev/null; then modProbeNumber=$(sudo dmesg | grep -m1 "enp1s0: link down" | awk '{if ($2 ~ /r[0-9].*/) { col=$2 } else { col=$3 }; gsub(":", "", col); print col }') sudo modprobe -r "$modProbeNumber" && sleep 10 && sudo modprobe "$modProbeNumber"