]> gitweb.fluxo.info Git - puppet-backup.git/commitdiff
Duplicity: remove dangling lockfiles
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 8 Sep 2016 18:20:48 +0000 (15:20 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 8 Sep 2016 18:20:48 +0000 (15:20 -0300)
templates/duplicity.conf.erb

index 6a4f68c12568ba73c31e932466ce5e80e00f4529..3f2cf9e8a0ac4e9d2e483b01fc07dc5b69c15c25 100644 (file)
@@ -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                    \