From 199a1d05626c260ae034c89f1a309980edc95525 Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Wed, 11 Oct 2023 22:58:45 +0200 Subject: [PATCH] add field-seperator for use multiple repositorys --- borg_exporter.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/borg_exporter.sh b/borg_exporter.sh index bd3ee0e..901ca46 100755 --- a/borg_exporter.sh +++ b/borg_exporter.sh @@ -160,7 +160,11 @@ echo "# TYPE borg_last_size_dedup gauge" >> $TMP_FILE if [ -n "${REPOSITORY}" ] then - getBorgDataForRepository "${REPOSITORY}" "${HOSTNAME}" + for i in $(echo $REPOSITORY | tr ";" "\n") + do + echo "Use Repository: $i" + getBorgDataForRepository "${i}" "${HOSTNAME}" + done else #discover (recursively) borg repositories starting from a path and extract info for each #(e.g. when running on the backup server directly) @@ -199,6 +203,7 @@ fi #cleanup rm -f $TMP_FILE -sleep 60 +# Wait 10 hours +sleep 6000 done