OSDN Git Service
(root)
/
instantos
/
instantOS.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
better internet check
[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 || timeout 10 curl -s packages.instantos.io || timeout 5 curl -s cht.sh; then
6
exit 0
7
else
8
echo "internet access is unreliable or not working"
9
exit 1
10
fi