]> gitweb.fluxo.info Git - borger.git/commitdiff
Set a special lockfile for continuous mode
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 7 Aug 2019 00:06:50 +0000 (21:06 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 7 Aug 2019 00:06:50 +0000 (21:06 -0300)
borger

diff --git a/borger b/borger
index 82abc7fb093ae4f54500afc50359a0a5bbd677cd..bd7180dc4e710d48a955af7327ce8aa668d657ae 100755 (executable)
--- a/borger
+++ b/borger
@@ -95,7 +95,11 @@ function borger_config {
   fi
 
   # Lockfile location
-  LOCKFILE="$TMP/$BASENAME/$DESTINATION.lock"
+  if [ "$OPTION" == "--continuous" ]; then
+    LOCKFILE="$TMP/$BASENAME/$DESTINATION-continuous.lock"
+  else
+    LOCKFILE="$TMP/$BASENAME/$DESTINATION.lock"
+  fi
 }
 
 # List
@@ -283,6 +287,8 @@ elif [ "$OPTION" == "--info" ]; then
 elif [ "$OPTION" == "--continuous" ]; then
   borger_check_multiple
   borger_config
+  borger_check_lockfile
+  borger_set_lockfile
 
   # Convert the pass command to passphrase otherwise
   # the user would be interrupted by a passphrase prompt