From fcf8243e9c3286d3eb863770da92abd1c1338001 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 8 Sep 2016 15:20:48 -0300 Subject: Duplicity: remove dangling lockfiles --- templates/duplicity.conf.erb | 6 ++++++ 1 file changed, 6 insertions(+) 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 \ -- cgit v1.2.3