]> gitweb.fluxo.info Git - borger.git/commitdiff
Run as a subprocess on continuous mode
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 24 May 2018 11:47:13 +0000 (08:47 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 24 May 2018 11:47:13 +0000 (08:47 -0300)
borger

diff --git a/borger b/borger
index 76ad9dc21f4de3272de3b5cc02733ade9b88563c..a00e84a8fef7c56002769a87b2e21671364534a0 100755 (executable)
--- a/borger
+++ b/borger
@@ -9,6 +9,7 @@
 # https://borgbackup.readthedocs.io/en/stable/usage/help.html#borg-help-placeholders
 
 # Parameters
+FULLNAME="$0"
 BASENAME="`basename $0`"
 DESTINATION="$1"
 OPTION="$2"
@@ -173,7 +174,8 @@ elif [ "$OPTION" == "--check" ]; then
   borger_check
 elif [ "$OPTION" == "--continuous" ]; then
   while true; do
-    borger_run
+    # Run as a subprocess so we do not exit on any fatal error
+    $FULLNAME $DESTINATION
     info "Running on continous mode... sleeping $INTERVAL..."
     sleep $INTERVAL
   done