From 4dbde0c7fcf727627af79ffc61ff86987ecdd7d0 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Mon, 11 Jul 2022 14:12:03 +0200
Subject: [PATCH] mal doch Pipes replacen

---
 icinga-cli.sh | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/icinga-cli.sh b/icinga-cli.sh
index 4efc6f8..7d49ed6 100755
--- a/icinga-cli.sh
+++ b/icinga-cli.sh
@@ -359,14 +359,14 @@ function processCheck(){
       _echo -------- check output:
       _echo $( cat "$_outfile" )
 
-      # iPipes=$( grep -o "|" < "$_outfile" | wc -l )
-      # _echo "Pipe chars: $iPipes"
-      # if [[ $iPipes -gt 1 ]]; then
-      #   _elog "WARNING - pipes were found in plugin output"
-      #   _elog "command was: $myFullscript $myparams"
-      #   _log "${_logPrefix} WARNING - pipes were found in plugin output"
-      #   sed -i "s#|#:#g" "$_outfile"
-      # fi
+      iPipes=$( grep -o "|" < "$_outfile" | wc -l )
+      _echo "Pipe chars: $iPipes"
+      if [[ $iPipes -gt 1 ]]; then
+        _elog "WARNING - pipes were found in plugin output"
+        _elog "command was: $myFullscript $myparams"
+        _log "${_logPrefix} WARNING - pipes were found in plugin output"
+      fi
+      sed -i "s#|#:#g" "$_outfile"
 
       _echo
       # echo -------- extracted performance data:
-- 
GitLab