summaryrefslogtreecommitdiff
path: root/bin/offline
blob: 8c0d5cd9ba30b7b4a633afbbb50a5062c1e2fcda (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

# An alternative is nm-online(1).  However, that will probably succeed
# even if we can't access the wider Internet.
#
# `nmcli networking connectivity` apparently checks for full Internet
# access but I'm not sure how it manages that.  Also, I don't use
# network manager on all machines, so this google wget is probably
# better for that reason alone

! wget -q --tries=10 --timeout=20 --spider http://google.com