Skip to content
Snippets Groups Projects

show message if no sudo permissions on onehost

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