Fix network script finally

This commit is contained in:
natemaia 2018-02-26 21:01:09 -08:00
parent 169674eac8
commit 9cc5a56b00

View File

@ -8,7 +8,7 @@ ethernet_connected=""
while true; do while true; do
if ping -c1 8.8.8.8 2>/dev/null; then if ping -c1 8.8.8.8 2>/dev/null; then
ID=$(ip link | awk '/state UP/ {print $2}') ID=$(ip link | awk '/state UP/ {print $2}')
if [[ ${ID[0]} == "e" ]]; then if [[ $ID == e* ]]; then
echo "$ethernet_connected" ; sleep 10 echo "$ethernet_connected" ; sleep 10
else else
echo "$wireless_connected" ; sleep 10 echo "$wireless_connected" ; sleep 10