diff --git a/pki/icinga2-setup-agent.cmake b/pki/icinga2-setup-agent.cmake index d01d8fc1d..2833e7dc0 100644 --- a/pki/icinga2-setup-agent.cmake +++ b/pki/icinga2-setup-agent.cmake @@ -14,6 +14,17 @@ if [ -n "$1" ]; then exit 1 fi + while true; do + echo -n "Upstream Icinga instance name: " + if ! read UPSTREAM; then + exit 1 + fi + + if [ -n "$UPSTREAM" ]; then + break + fi + done + echo "Installing the certificate bundle..." tar -C $ICINGA2CONFIG/pki/agent/ -xf "$1" @@ -30,6 +41,8 @@ object AgentListener "agent" { key_path = SysconfDir + "/icinga2/pki/agent/agent.key" ca_path = SysconfDir + "/icinga2/pki/agent/ca.crt" + upstream_name = "$UPSTREAM" + bind_port = 7000 } AGENT