aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsign-sync-binpackages.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/sign-sync-binpackages.sh b/sign-sync-binpackages.sh
index 7db6611..4dfe034 100755
--- a/sign-sync-binpackages.sh
+++ b/sign-sync-binpackages.sh
@@ -43,15 +43,17 @@ export BINPKG_GPG_SIGNING_GPG_HOME=/home/gmirror/.gnupg-releng
export BINPKG_GPG_SIGNING_KEY=13EBBDBEDE7A12775DFDB1BABB572E0E2D182910
export BINPKG_GPG_VERIFY_GPG_HOME=${BINPKG_GPG_SIGNING_GPG_HOME}
+export LOCKFILE=${STAGINGTREE}/.running
+
# this script needs to be run as gmirror user
[[ $(whoami) == "gmirror" ]] || exit 111
# we make sure we're not running twice in parallel
-if [[ -f ${STAGINGTREE}/.running ]] ; then
- echo sign-sync-binpackages.sh lockfile ${STAGINGTREE}/.running exists, aborting
+if [[ -f ${LOCKFILE} ]] ; then
+ echo sign-sync-binpackages.sh lockfile ${LOCKFILE} exists, aborting
exit 112
fi
-touch ${STAGINGTREE}/.running || exit 110
+touch ${LOCKFILE} || exit 110
# make sure we have an updated gpg-agent
gpgconf --kill all
@@ -114,4 +116,4 @@ done
# we're done so remove the "lockfile"
-rm ${STAGINGTREE}/.running
+rm ${LOCKFILE}