From eafeea317761bae375e591f763fb42c4664aa74e Mon Sep 17 00:00:00 2001 From: Cullum Smith Date: Sat, 26 Oct 2024 09:10:00 -0400 Subject: cleanup icinga scripts --- scripts/hostclass/icinga_server/40-plugins | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 scripts/hostclass/icinga_server/40-plugins (limited to 'scripts/hostclass/icinga_server/40-plugins') diff --git a/scripts/hostclass/icinga_server/40-plugins b/scripts/hostclass/icinga_server/40-plugins new file mode 100644 index 0000000..a0fb36a --- /dev/null +++ b/scripts/hostclass/icinga_server/40-plugins @@ -0,0 +1,36 @@ +#!/bin/sh + +# These are used for RADIUS authentication checks. +icinga_tls_client_cert="${icinga_home_dir}/${icinga_username}.crt" +icinga_tls_client_key="${icinga_home_dir}/${icinga_username}.key" + +# Install package dependencies for custom plugins. +pkg install -y \ + wpa_supplicant + +# Copy custom plugins. +install_file -m 0555 \ + "${icinga_plugin_dir}/check_eapol" + +# Create wpa_supplicant file for radius checks. +install_template -m 0640 -g "$icinga_local_user" "${icinga_home_dir}/eap-ttls-pap.conf" +install_template -m 0640 -g "$icinga_local_user" "${icinga_home_dir}/eap-tls.conf" + +# Add icinga user to wifi access role. +ldap_add "cn=${wifi_access_role},${roles_basedn}" <