diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-12-07 10:39:00 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-12-07 17:46:56 -0700 |
commit | 64a3111fdb7956500a1970c004338e9ee254351a (patch) | |
tree | 3b90bb5d87faf51a4721e12adabb150e5b794e0b /bin/workstation-duplicity | |
parent | 3240f48f78ecf1f557a10a6a2090553b441b39e1 (diff) | |
download | dotfiles-64a3111fdb7956500a1970c004338e9ee254351a.tar.gz |
replace 'offline' script
Diffstat (limited to 'bin/workstation-duplicity')
-rwxr-xr-x | bin/workstation-duplicity | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/workstation-duplicity b/bin/workstation-duplicity index f46fd0b9..d4f7e246 100755 --- a/bin/workstation-duplicity +++ b/bin/workstation-duplicity @@ -19,6 +19,11 @@ if ! [ -e "$HOME/.duply/$DUPLY_PROFILE/conf" ]; then exit 1 fi +offline () { + test "$(wget -q -O- --tries=10 -T20 http://www.msftncsi.com/ncsi.txt)" \ + != "Microsoft NCSI" +} + # fewer checks if we're running at a terminal (this is a bashism) if ! [ -t 1 ]; then # check when we last ran; don't run if it was less than four hours ago |