From 11b9704aead5c3681cf6e7dbdc5b6cb654312c6d Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Wed, 23 Oct 2013 01:40:23 +1300 Subject: [PATCH] Put in locking so we don't get obnam running multiple times. --- run-backup | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/run-backup b/run-backup index 4c5d30f..359c8d3 100755 --- a/run-backup +++ b/run-backup @@ -91,7 +91,15 @@ if ( check_host 'AAAA' -o check_host 'A' ) then capture_debconf_info + if ! lockfile -r20 /var/lock/etc-obnam + then + echo Failed to obtain local lock + exit + fi + obnam --quiet --client-name=$CLIENT backup $WORKDIR $SOURCE + + rm /var/lock/etc-obnam exit 0 else echo huh, where is it? -- 2.30.2