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 @@
# 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
# 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
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=0.3
export self_APPVERSION=1.0
# --- set HOME
HOME=/etc/icingaclient
......@@ -100,17 +99,11 @@ EOF
fi
}
# show usage
function _usage(){
local _self=$( basename $0 )
cat <<EOH
______________________________________________________________________
${self_APPNAME} :: v${self_APPVERSION}
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
# show help text
function showHelp(){
local _self; _self=$(basename $0)
cat <<EOF
$( ph.showImlHelpHeader )
USAGE:
$_self [OPTIONS] -m METHOD
......@@ -133,7 +126,7 @@ EXAMPLES:
$_self -i
$_self -m commands
EOH
EOF
}
function _mysqlreadvars(){
......@@ -206,7 +199,7 @@ bOptUninstall=$( ph.hasParamoption "u" "$@")
bOptHelp=$( ph.hasParamoption "h" "$@")
if [ $bOptHelp -eq 1 -o $# -lt 1 ]; then
_usage
showHelp
exit 0
fi
......@@ -245,7 +238,6 @@ fi
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"
fi
. "${cfgfile}"
# ----------------------------------------------------------------------
......@@ -328,7 +320,7 @@ case "${sMode}" in
*)
echo ERRROR: [${sMode}] is an INVALID mode
_usage
showHelp
ph.abort
esac
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment