aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/duplicity.conf.erb6
1 files changed, 6 insertions, 0 deletions
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 \