From 7f55250f3018f610ccc3874c1bde2f3d5ef533a0 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 13 Jul 2024 09:57:31 -0300 Subject: Fix: borg: exit code handling --- templates/borg.sh.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/borg.sh.erb b/templates/borg.sh.erb index 6519814..ee248e6 100644 --- a/templates/borg.sh.erb +++ b/templates/borg.sh.erb @@ -82,7 +82,7 @@ borg create \ <%= add %> \ <% end -%> - backup_exit=$? +backup_exit=$? #if [ "$backup_exit" != "0" ]; then # fatal "Error creating snapshot" @@ -105,7 +105,7 @@ borg prune \ --keep-weekly <%= @keepweekly %> \ --keep-monthly <%= @keepmonthly %> \ - prune_exit=$? +prune_exit=$? #if [ "$prune_exit" != "0" ]; then # fatal "Error pruning repository" @@ -147,6 +147,8 @@ if [ "<%= @encryption %>" == "keyfile" ] && [ ! -z "<%= @keyfile %>" ]; then gpg_copy_exit=$? fi +else + gpg_copy_exit=0 fi # Use highest exit code as global exit code -- cgit v1.2.3