From 04d853c8cc536219da7a5d18d5884b443bfe94cc Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Thu, 16 Mar 2023 10:40:05 +0100 Subject: [PATCH] Improved Plan B scripts. --- Plan Borg/bin/deploy-remote | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Plan Borg/bin/deploy-remote b/Plan Borg/bin/deploy-remote index 26d7e25..326f6e1 100755 --- a/Plan Borg/bin/deploy-remote +++ b/Plan Borg/bin/deploy-remote @@ -48,11 +48,20 @@ else fi # Peupler le dossier de configruation de Borgmatic. -mkdir -p /etc/borgmatic -cd /etc/borgmatic -URL=https://git.a-lec.org/a-lec/commissions/infrastructure/sauvegardes/-/raw/main/Plan%20Borg/ -wget -nv $URL/models/excludes -wget -nv $URL/models/model-conf-remote-client.yaml -O /etc/borgmatic/config.yaml +if [ -d /etc/borgmatic ]; then + echo "Borgmatic configuration files: PASSED" +else + mkdir -p /etc/borgmatic + cd /etc/borgmatic + URL=https://git.a-lec.org/a-lec/commissions/infrastructure/sauvegardes/-/raw/main/Plan%20Borg/ + wget -nv $URL/models/excludes + wget -nv $URL/models/model-conf-remote-client.yaml -O /etc/borgmatic/config.yaml + echo "Borgmatic configuration files: DONE" +fi # VĂ©rifier que la configuration Borgmatic. validate-borgmatic-config +echo "Borgmatic configuration check: DONE." + +echo "ALL OK." +