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

systemdunit: replace pipes in systemctl output

parent c679d7cb
No related branches found
No related tags found
1 merge request!179systemdunit: replace pipes in systemctl output
......@@ -8,11 +8,12 @@
# 2020-09-06 v1.1 <axel.hahn@unibe.ch> add params -s, -l
# 2020-09-06 v1.2 <axel.hahn@unibe.ch> add param -r to use a regex
# 2020-09-18 v1.3 <axel.hahn@unibe.ch> fix: list units --all to show all stopped units
# 2020-09-18 v1.4 <axel.hahn@unibe.ch> replace pipes in systemctl status output
# ================================================================================
. $( dirname $0 )/inc_pluginfunctions
export self_APPVERSION=1.3
export self_APPVERSION=1.4
# ----------------------------------------------------------------------
# FUNCTIONS
......@@ -126,7 +127,7 @@ fi
# --- check given unit
_status=$( systemctl --no-pager -l status "${_unit}" 2>&1 )
_status=$( systemctl --no-pager -l status "${_unit}" 2>&1 | tr '|' ':' )
if ! grep "Active: active (running) " <<< "${_status}" >/dev/null; then
ph.setStatus critical
......
......@@ -18,7 +18,7 @@ The kind of check is defined by a parameter `-m METHOD`.
./check_psqlserver -h
______________________________________________________________________
CHECK_PSQLSERVER :: v0.7
CHECK_PSQLSERVER :: v0.9
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
......
......@@ -16,7 +16,7 @@ A unit is everything listed by systemctl command - services, timers, targets, ..
______________________________________________________________________
CHECK_SYSTEMDUNIT
v1.3
v1.4
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment