13 lines
223 B
Plaintext
13 lines
223 B
Plaintext
![]() |
#!/usr/bin/env bash
|
||
|
|
||
|
connected=""
|
||
|
disconnected=""
|
||
|
while true; do
|
||
|
if ping -c1 8.8.8.8 >/dev/null; then
|
||
|
echo "$connected"; sleep 5
|
||
|
else
|
||
|
echo "$disconnected"; sleep 1
|
||
|
echo "$connected"; sleep 1
|
||
|
fi
|
||
|
done
|