From: Andrew Ruthven Date: Tue, 22 Oct 2013 12:40:23 +0000 (+1300) Subject: Put in locking so we don't get obnam running multiple times. X-Git-Tag: v0.6~3 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11b9704aead5c3681cf6e7dbdc5b6cb654312c6d;p=etc-obnam.git Put in locking so we don't get obnam running multiple times. --- 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?