From 64a3111fdb7956500a1970c004338e9ee254351a Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 7 Dec 2022 10:39:00 -0700 Subject: replace 'offline' script --- bin/workstation-duplicity | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bin/workstation-duplicity') 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 -- cgit v1.2.3