Update network script

This commit is contained in:
natemaia 2018-02-26 08:42:50 -08:00
parent a0c0fb9289
commit 169674eac8

View File

@ -6,7 +6,7 @@ wireless_connected=""
ethernet_connected="" ethernet_connected=""
while true; do while true; do
if [[ $(ping -c1 8.8.8.8) ]]; 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[0]} == "e" ]]; then
echo "$ethernet_connected" ; sleep 10 echo "$ethernet_connected" ; sleep 10