Skip to content
Snippets Groups Projects
Commit f3e6ffe7 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

replace pipes in systemctl status output

parent 1351fa04
No related branches found
No related tags found
1 merge request!180replace pipes in systemctl status output
...@@ -24,12 +24,13 @@ ...@@ -24,12 +24,13 @@
# 2022-02-28 v1.5 <axel.hahn@iml.unibe.ch> fix output of error counter # 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) # 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 # 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 . $( dirname $0 )/inc_pluginfunctions
export self_APPVERSION=2.1 export self_APPVERSION=2.2
statusScript=/opt/cronwrapper/cronstatus.sh statusScript=/opt/cronwrapper/cronstatus.sh
...@@ -93,7 +94,7 @@ else ...@@ -93,7 +94,7 @@ else
ph.setStatus "ok" ph.setStatus "ok"
fi fi
ph.status Cronjob status $( echo "$out" | tail -1 ) 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 fi
ph.exit ph.exit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment