13 lines
223 B
Bash
Executable File
13 lines
223 B
Bash
Executable File
#!/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
|