Skip to content
Snippets Groups Projects

replace pipes in systemctl status output

Merged Hahn Axel (hahn) requested to merge 6669-warnings-in-journallog into master
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
+ 3
2
@@ -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
Loading