]> granicus.if.org Git - icinga2/commitdiff
Update the upstream_name attribute in the setup script.
authorGunnar Beutner <gunnar.beutner@netways.de>
Sat, 12 Apr 2014 10:56:35 +0000 (12:56 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Sat, 12 Apr 2014 10:56:35 +0000 (12:56 +0200)
Refs #4865

pki/icinga2-setup-agent.cmake

index d01d8fc1d88ab300143eb97a94f69e510863a3df..2833e7dc0c825e7afec68574d963aa2bcdbafdcf 100644 (file)
@@ -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