diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-07-13 09:57:31 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-07-13 09:57:31 -0300 |
commit | 7f55250f3018f610ccc3874c1bde2f3d5ef533a0 (patch) | |
tree | ad26c04555e2f42e139ffea598c4cbdd5bbb436b | |
parent | 376049d970385bdb2b851590ed49607c0005d248 (diff) | |
download | puppet-backup-7f55250f3018f610ccc3874c1bde2f3d5ef533a0.tar.gz puppet-backup-7f55250f3018f610ccc3874c1bde2f3d5ef533a0.tar.bz2 |
Fix: borg: exit code handling
-rw-r--r-- | templates/borg.sh.erb | 6 |
1 files changed, 4 insertions, 2 deletions
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 |