From: Silvio Rhatto Date: Thu, 8 Sep 2016 18:20:48 +0000 (-0300) Subject: Duplicity: remove dangling lockfiles X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=fcf8243e9c3286d3eb863770da92abd1c1338001;p=puppet-backup.git Duplicity: remove dangling lockfiles --- diff --git a/templates/duplicity.conf.erb b/templates/duplicity.conf.erb index 6a4f68c..3f2cf9e 100644 --- a/templates/duplicity.conf.erb +++ b/templates/duplicity.conf.erb @@ -33,6 +33,12 @@ if [ "$1" == "--check" ]; then else # cleanup any previous broken backups duplicity cleanup file:///$BACKUP_FOLDER --force + + # remove dangling lockfiles + if [ -z "`pidof duplicity`" ]; then + rm /root/.cache/duplicity/*/lockfile.lock + fi + # it's important to let $EXCLUDE come before $INCLUDE to # have greater precedence; see duplicity(1) for more info duplicity -v6 --full-if-older-than $FULL_IF_OLDER_THAN \