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

Merge branch '6435-check-onehost' into 'master'

show message if no sudo permissions on onehost

See merge request !103
parents 725e4247 06d121e7
No related branches found
No related tags found
1 merge request!103show message if no sudo permissions on onehost
...@@ -8,13 +8,14 @@ ...@@ -8,13 +8,14 @@
# #
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# 2023-06-09 v1.0 <axel.hahn@unibe.ch> initial version # 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 . $(dirname $0)/inc_pluginfunctions
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=1.0 self_APPVERSION=1.1
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# functions # functions
...@@ -75,6 +76,7 @@ cmdout=$( sudo onehost list --csv 2>&1 ) ...@@ -75,6 +76,7 @@ cmdout=$( sudo onehost list --csv 2>&1 )
if ! grep "ID,NAME" <<< "$cmdout" >/dev/null; then if ! grep "ID,NAME" <<< "$cmdout" >/dev/null; then
ph.setStatus "unknown" ph.setStatus "unknown"
echo "UNKNOWN: sudo onehost failed."
echo "$cmdout" echo "$cmdout"
ph.exit ph.exit
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment