#!/bin/bash # This generates and signs your required certificates. Please do not # forget to install the Icinga 2 package and your desired monitoring # plugins first: ICINGA_PKI_DIR=/etc/icinga2/pki # Django : 2016-07-27 # default: ICINGA_USER=nagios ICINGA_USER=icinga mkdir $ICINGA_PKI_DIR chown $ICINGA_USER $ICINGA_PKI_DIR icinga2 pki new-cert --cn vml000017.dmz.nausch.org \ --key $ICINGA_PKI_DIR/vml000017.dmz.nausch.org.key \ --cert $ICINGA_PKI_DIR/vml000017.dmz.nausch.org.crt icinga2 pki save-cert --key $ICINGA_PKI_DIR/vml000017.dmz.nausch.org.key \ --trustedcert $ICINGA_PKI_DIR/trusted-master.crt \ --host vml000117.dmz.nausch.org icinga2 pki request --host vml000117.dmz.nausch.org \ --port 5665 \ --ticket 887f9a6a8aa9b65ae60bd7992fff425a5da67be8 \ --key $ICINGA_PKI_DIR/vml000017.dmz.nausch.org.key \ --cert $ICINGA_PKI_DIR/vml000017.dmz.nausch.org.crt \ --trustedcert $ICINGA_PKI_DIR/trusted-master.crt \ --ca $ICINGA_PKI_DIR/ca.crt