From 06d121e791f1985f80b3853a2caf92f4050ba41c Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Mon, 12 Jun 2023 12:19:40 +0200 Subject: [PATCH] show message if no sudo permissions on onehost --- check_onehost | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/check_onehost b/check_onehost index f360fa4..dbea3f7 100755 --- a/check_onehost +++ b/check_onehost @@ -8,13 +8,14 @@ # # ---------------------------------------------------------------------- # 2023-06-09 v1.0 <axel.hahn@unibe.ch> initial version +# 2023-06-12 v1.1 <axel.hahn@unibe.ch> show message if no sudo permissions on onehost command exist # ====================================================================== . $(dirname $0)/inc_pluginfunctions self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) -self_APPVERSION=1.0 +self_APPVERSION=1.1 # ---------------------------------------------------------------------- # functions @@ -75,6 +76,7 @@ cmdout=$( sudo onehost list --csv 2>&1 ) if ! grep "ID,NAME" <<< "$cmdout" >/dev/null; then ph.setStatus "unknown" + echo "UNKNOWN: sudo onehost failed." echo "$cmdout" ph.exit fi -- GitLab