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

mysqlserver: update help page; fix not found

parent 8b1bffcf
Branches
No related tags found
1 merge request!1306468 docs and harmonize
...@@ -19,13 +19,12 @@ ...@@ -19,13 +19,12 @@
# 2021-06-08 v0.1 <axel.hahn@iml.unibe.ch> update HOME .. better implement a param and ENV var # 2021-06-08 v0.1 <axel.hahn@iml.unibe.ch> update HOME .. better implement a param and ENV var
# 2021-06-24 v0.2 <axel.hahn@iml.unibe.ch> check if query cache is enabled as a shared function # 2021-06-24 v0.2 <axel.hahn@iml.unibe.ch> check if query cache is enabled as a shared function
# 2023-06-06 v0.3 <axel.hahn@unibe.ch> some shell fixes # 2023-06-06 v0.3 <axel.hahn@unibe.ch> some shell fixes
# 2023-07-28 v1.0 <axel.hahn@unibe.ch> update help page; fix [client]: command not found
# ====================================================================== # ======================================================================
. $( dirname $0 )/inc_pluginfunctions . $( dirname $0 )/inc_pluginfunctions
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) export self_APPVERSION=1.0
self_APPVERSION=0.3
# --- set HOME # --- set HOME
HOME=/etc/icingaclient HOME=/etc/icingaclient
...@@ -100,17 +99,11 @@ EOF ...@@ -100,17 +99,11 @@ EOF
fi fi
} }
# show usage # show help text
function _usage(){ function showHelp(){
local _self=$( basename $0 ) local _self; _self=$(basename $0)
cat <<EOH cat <<EOF
______________________________________________________________________ $( ph.showImlHelpHeader )
${self_APPNAME} :: v${self_APPVERSION}
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
USAGE: USAGE:
$_self [OPTIONS] -m METHOD $_self [OPTIONS] -m METHOD
...@@ -133,7 +126,7 @@ EXAMPLES: ...@@ -133,7 +126,7 @@ EXAMPLES:
$_self -i $_self -i
$_self -m commands $_self -m commands
EOH EOF
} }
function _mysqlreadvars(){ function _mysqlreadvars(){
...@@ -206,7 +199,7 @@ bOptUninstall=$( ph.hasParamoption "u" "$@") ...@@ -206,7 +199,7 @@ bOptUninstall=$( ph.hasParamoption "u" "$@")
bOptHelp=$( ph.hasParamoption "h" "$@") bOptHelp=$( ph.hasParamoption "h" "$@")
if [ $bOptHelp -eq 1 -o $# -lt 1 ]; then if [ $bOptHelp -eq 1 -o $# -lt 1 ]; then
_usage showHelp
exit 0 exit 0
fi fi
...@@ -245,7 +238,6 @@ fi ...@@ -245,7 +238,6 @@ fi
if ! grep $myuser $cfgfile >/dev/null 2>&1; then if ! grep $myuser $cfgfile >/dev/null 2>&1; then
ph.abort "MYSQL access not possible yet. You need to install the monitoring user first: as root execute $(basename $0) -i" ph.abort "MYSQL access not possible yet. You need to install the monitoring user first: as root execute $(basename $0) -i"
fi fi
. "${cfgfile}"
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
...@@ -328,7 +320,7 @@ case "${sMode}" in ...@@ -328,7 +320,7 @@ case "${sMode}" in
*) *)
echo ERRROR: [${sMode}] is an INVALID mode echo ERRROR: [${sMode}] is an INVALID mode
_usage showHelp
ph.abort ph.abort
esac esac
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment