From aafd95a24b6971fd5355af6e82ab88e599951b51 Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Mon, 15 Aug 2016 06:17:53 -0700 Subject: [PATCH] Add option to check file if network is shoddy. Avoids hitting network on bad connections. --- calendar-run.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/calendar-run.sh b/calendar-run.sh index 46f84ea..8016abb 100755 --- a/calendar-run.sh +++ b/calendar-run.sh @@ -49,6 +49,10 @@ set -e /usr/bin/git status > /dev/null # Make sure machine is up. set -e will ensure that. +if [ -f $HOME/.shoddy-network ]; then + exit 0 +fi + /bin/ping -q -w 20 -c 5 $HOME_MACHINE > /dev/null 2>&1 cd ~/calendars/personal/private/bkuhn