From f3e6ffe7c440fc6fbff01de36caa654754c2cd74 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Mon, 18 Sep 2023 13:42:58 +0200
Subject: [PATCH] replace pipes in systemctl status output

---
 check_cronstatus | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/check_cronstatus b/check_cronstatus
index 1d1a751..112c94d 100755
--- a/check_cronstatus
+++ b/check_cronstatus
@@ -24,12 +24,13 @@
 # 2022-02-28  v1.5  <axel.hahn@iml.unibe.ch>  fix output of error counter
 # 2022-08-23  v2.0  <axel.hahn@iml.unibe.ch>  simplify it: use cronstatus.sh (it has exitcode >0 on errors now)
 # 2023-07-27  v2.1  <axel.hahn@unibe.ch>      update help page
+# 2020-09-18  v2.2  <axel.hahn@unibe.ch>      replace pipes in systemctl status output
 # ======================================================================
 
 
 . $( dirname $0 )/inc_pluginfunctions
 
-export self_APPVERSION=2.1
+export self_APPVERSION=2.2
 
 statusScript=/opt/cronwrapper/cronstatus.sh
 
@@ -93,7 +94,7 @@ else
                 ph.setStatus "ok"
         fi
         ph.status Cronjob status $( echo "$out" | tail -1 )
-        echo "$out" |  sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g"
+        echo "$out" |  sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" | tr '|' ':' 
 fi
 ph.exit
 
-- 
GitLab