Fix issue with update checker script and minor other fixes

This commit is contained in:
natemaia
2018-07-19 18:52:19 -07:00
parent 4b6cab805c
commit b363ef013a
6 changed files with 40 additions and 51 deletions

View File

@ -6,14 +6,10 @@ disconnected2="\\"
wireless_connected=""
ethernet_connected=""
ID="$(ip link | awk '/state UP/ {print $2}')"
while true; do
if (ping -c 1 archlabslinux.com || ping -c 1 google.com || ping -c 1 bitbucket.org || ping -c 1 github.com || ping -c 1 sourceforge.net) &>/dev/null; then
# avoid checking what type of interface it is every loop
if (( count < 1 )); then
ID="$(ip link | awk '/state UP/ {print $2}')"
((count++))
fi
if [[ $ID == e* ]]; then
echo "$ethernet_connected" ; sleep 25
else