Project

General

Profile

Anomalie #3461

Le script de backup relève une erreur si aucun post-hook n'est configuré

Added by Edouard Dausque over 2 years ago. Updated over 1 year ago.

Status:
Fermé
Priority:
Normale
Category:
-
Target version:
-
Start date:
11/18/2018
Due date:
% Done:

100%

Estimated time:

Description

Lorsque le dossier "/etc/borg/scripts/post-hooks/" est vide, le script essaie d'executer "/etc/borg/scripts/post-hooks/*", ce qui n'existe pas.

History

#1

Updated by Edouard Dausque over 2 years ago

Je propose le patch suivant

--- a/backup-chapril/src/backup.sh
+++ b/backup-chapril/src/backup.sh
@@ -63,6 +63,7 @@ date                                          >> $logger
 echo ""                                        >> $logger

 for file in /etc/borg/scripts/post-hooks/*; do
+    [[ -f "$file" ]] || continue
        echo "Executing $file...                        " >> $logger
        $file
 done

#2

Updated by Edouard Dausque over 2 years ago

J'ai construit le paquet "backup-chapril_1.0.2" qui contient le patch ci-dessus

#3

Updated by Edouard Dausque over 2 years ago

paquet deployé et installé sur l'ensemble du parc

#4

Updated by Edouard Dausque over 2 years ago

Test : OK
Commit : OK

#5

Updated by Edouard Dausque over 2 years ago

  • Status changed from Nouveau to Résolu
  • % Done changed from 0 to 100
#6

Updated by Christian P. Momon over 1 year ago

  • Project changed from Chapril to Infra Chapril
  • Status changed from Résolu to Fermé

Also available in: Atom PDF