12 lines
199 B
Bash
Executable File
12 lines
199 B
Bash
Executable File
#!/bin/bash
|
|
|
|
net_status () {
|
|
if (ping -c 1 google.com || ping -c 1 archlinux.org || ping -c 1 github.com) &> /dev/null; then
|
|
echo true;
|
|
else
|
|
echo false;
|
|
fi
|
|
}
|
|
|
|
net_status
|