From ab85e88193922a32b13c6b61575ddebf3eb85e48 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Mon, 12 Jun 2023 16:50:30 +0200 Subject: [PATCH] add new line --- check_onevm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/check_onevm b/check_onevm index 8334810..c41dd05 100755 --- a/check_onevm +++ b/check_onevm @@ -41,6 +41,12 @@ self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) self_APPVERSION=1.0 +# new line +NL=" +" +out="" +showData=0 + # ---------------------------------------------------------------------- # functions # ---------------------------------------------------------------------- @@ -93,8 +99,6 @@ case "$1" in *) esac -showData=0 - # --- get data cmdout=$( sudo onevm list --csv 2>&1 ) @@ -125,17 +129,17 @@ ph.perfadd "other" "${iOther}" if [ $iUnknown -ne 0 ]; then ph.setStatus "warning" - out+="WARNING: a vm with status [Unknown] was found." + out+="WARNING: a vm with status [Unknown] was found.${NL}" fi if [ $iOther -ne 0 ]; then ph.setStatus "warning" - out+="WARNING: There is a VM that has another status than [running]." + out+="WARNING: There is a VM that has another status than [running].${NL}" fi if [ $iFail -ne 0 ]; then ph.setStatus "critical" - out+="ERROR: a vm with status [Failed] was found." + out+="ERROR: a vm with status [Failed] was found.${NL}" fi out+=$( -- GitLab