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

update icinga cli

parent e06f93ad
No related branches found
No related tags found
1 merge request!45OP#7617 Icinga client - Zertifikatsprüfung bei Senden an Sattelit prüfen https://projects.iml.unibe.ch/work_packages/7617
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment