OSDN Git Service
(root)
/
instantos
/
instantOS.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
23e5b77419a47595e9c78c0c7c241a020d3312c0
[instantos/instantOS.git]
/
programs
/
checkinternet
1
#!/bin/bash
2
3
# quick utility to check for internet access
4
5
if timeout 10 ping -q -c 1 -W 1 8.8.8.8 &>/dev/null; then
6
exit 0
7
else
8
echo "internet access is unreliable or not working"
9
exit 1
10
fi