mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-24 02:01:08 +00:00
Add script to check if there is internet connection or restart mobprobe
This commit is contained in:
parent
5799d5a332
commit
96220e593e
4
Services/fixInternetAfterSleep.sh
Executable file
4
Services/fixInternetAfterSleep.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
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"
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user