diff options
-rwxr-xr-x | sign-sync-binpackages.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sign-sync-binpackages.sh b/sign-sync-binpackages.sh index cc1a957..862cea9 100755 --- a/sign-sync-binpackages.sh +++ b/sign-sync-binpackages.sh @@ -54,6 +54,8 @@ if [[ -f ${LOCKFILE} ]] ; then exit 112 fi touch ${LOCKFILE} || exit 110 +# ensure the lock is cleaned on exit +trap "rm -f ${LOCKFILE}" SIGINT SIGTERM # make sure we have an updated gpg-agent gpgconf --kill all @@ -122,8 +124,4 @@ for a in ${ARCHES}; do date -u > ${arch_binpackages}/.timestamp done - -# we're done so remove the "lockfile" -rm ${LOCKFILE} - # vim: et ts=2 sts=2 sw=2 |