From: Alexander Schmidt Date: Sat, 14 Feb 2015 17:44:12 +0000 (+0100) Subject: Using /var/lock for lockdirs. X-Git-Url: https://git.treefish.org/~alex/backmeupscotty.git/commitdiff_plain/5e8b95f582e1327273442cc2ad0388aec5165d9c Using /var/lock for lockdirs. --- diff --git a/backmeupscotty b/backmeupscotty index 68afaf6..1d09266 100644 --- a/backmeupscotty +++ b/backmeupscotty @@ -126,7 +126,7 @@ function scottysync { } function deleteLock { - if ! rmdir /var/run/$(basename $0).lock; then + if ! rmdir /var/lock/$(basename $0); then scottyerror "Could not delete lockfile /tmp/$(basename $0).lock!" fi } @@ -209,7 +209,7 @@ function backmeupscotty { exit 0 } -if ! mkdir /var/run/$(basename $0).lock; then +if ! mkdir /var/lock/$(basename $0); then scottyerror "Another instance of $(basename $0) is still running!" exit 1 else