From 5227d90e37ab24f0a3b1c2a5d38b8098d2c88e7b Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 30 Jul 2012 14:59:38 -0700 Subject: [PATCH] Add a state file to indicate an ongoing update. --- CU2/handle-control-change.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CU2/handle-control-change.sh b/CU2/handle-control-change.sh index 02725db..061718e 100755 --- a/CU2/handle-control-change.sh +++ b/CU2/handle-control-change.sh @@ -2,9 +2,13 @@ . ./common.inc +touch "${STATES_DIR}/updating" if [ -e "$DNSCRYPT_FILE" ]; then - exec ./switch-to-dnscrypt.sh + ./switch-to-dnscrypt.sh else ./stop-dnscrypt-proxy.sh - exec ./switch-to-dhcp.sh + ./switch-to-dhcp.sh fi +rm -f "${STATES_DIR}/updating" +rm -f "${STATES_DIR}/update-request" +