Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • feature-delete_apache_modules
  • master
  • shellcheck-update
3 results

Target

Select target project
  • open-source/icinga-passive-client
1 result
Select Git revision
  • feature-delete_apache_modules
  • master
  • shellcheck-update
3 results
Show changes
Commits on Source (4)
......@@ -25,10 +25,11 @@
# 2023-11-03 v0.10 ah fix json key for service link
# 2024-03-26 v0.11 ah on service creation: use http status code instead of exitcode
# 2024-04-09 v0.12 ah add host_notes_url on host
# 2024-11-20 v0.13 ah update rest api client; show --hs param in the help
# ======================================================================
_version="0.12"
_version="0.13"
which curl >/dev/null || exit 1
which jo >/dev/null || exit 1
......@@ -664,6 +665,9 @@ Host actions
--hostdelete
Delete [$MY_NAME] in the icinga director
--hs
--hostshow
Show generated JSON for cur current host what should be sent
Check actions
......@@ -743,7 +747,7 @@ else
. "$_cfg"
fi
. $(dirname $0)/inc_functions.sh
. $(dirname $0)/inc/rest-api-client.sh
. $(dirname $0)/inc/http.class.sh
if [ $# -eq 0 ]; then
......
......@@ -24,11 +24,12 @@
# 2023-11-02 v0.17 ah fix line breaks of sent output, shell check fixes
# 2023-11-02 v0.18 ah fix quoting of perfdata in json
# 2023-11-02 v0.19 ah move _parseConfig
# 2024-11-20 v0.20 ah update rest api client; use cert "${dir_cfg}/certs/ca.crt"
# ======================================================================
_product="ICINGA PASSIVE CLIENT"
_version="0.19"
_version="0.20"
_license="GNU GPL 3.0"
_copyright='(c) Institute for Medical Education * University of Bern'
......@@ -72,6 +73,14 @@ function _initHttp(){
if [ $debug -ne 0 ]; then
http.setDebug 1
fi
local _cert="${dir_cfg}/certs/ca.crt"
if [ ! -f "$_cert" ]; then
echo
echo "ERROR: certificate was not found."
echo "Copy the Icinga master CA into $_cert"
exit 1
fi
http.setCA "$_cert"
}
......@@ -553,7 +562,7 @@ else
. "$( dirname $0 )/inc_getconfig.sh"
fi
. "$( dirname $0 )/inc/rest-api-client.sh"
. "$( dirname $0 )/inc/http.class.sh"
if [ $# -eq 0 ]; then
showHelp
......
This diff is collapsed.
This diff is collapsed.
#!/bin/sh
wget -O rest-api-client.sh https://git-repo.iml.unibe.ch/iml-open-source/bash-rest-api-client/-/raw/master/rest-api-client.sh
cd "$( dirname "$0" )"
myfile=http.class.sh
wget -O "$myfile" "https://git-repo.iml.unibe.ch/iml-open-source/bash-rest-api-client/-/raw/master/$myfile"