this.txtError = new System.Windows.Forms.TextBox();
this.lblError = new System.Windows.Forms.Label();
this.picBanner = new System.Windows.Forms.PictureBox();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.chkAcceptCommands = new System.Windows.Forms.CheckBox();
+ this.chkAcceptConfig = new System.Windows.Forms.CheckBox();
this.tabFinish.SuspendLayout();
this.tabConfigure.SuspendLayout();
this.tabParameters.SuspendLayout();
this.grpX509Fields.SuspendLayout();
this.tabError.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picBanner)).BeginInit();
+ this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// btnBack
//
// tabParameters
//
+ this.tabParameters.Controls.Add(this.groupBox3);
this.tabParameters.Controls.Add(this.txtTicket);
this.tabParameters.Controls.Add(this.lblTicket);
this.tabParameters.Controls.Add(this.txtInstanceName);
this.groupBox2.Controls.Add(this.rdoListener);
this.groupBox2.Location = new System.Drawing.Point(8, 359);
this.groupBox2.Name = "groupBox2";
- this.groupBox2.Size = new System.Drawing.Size(601, 111);
+ this.groupBox2.Size = new System.Drawing.Size(294, 111);
this.groupBox2.TabIndex = 2;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "TCP Listener";
this.picBanner.TabIndex = 1;
this.picBanner.TabStop = false;
//
+ // groupBox3
+ //
+ this.groupBox3.Controls.Add(this.chkAcceptConfig);
+ this.groupBox3.Controls.Add(this.chkAcceptCommands);
+ this.groupBox3.Location = new System.Drawing.Point(308, 359);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Size = new System.Drawing.Size(301, 111);
+ this.groupBox3.TabIndex = 5;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "Advanced Settings";
+ //
+ // chkAcceptCommands
+ //
+ this.chkAcceptCommands.AutoSize = true;
+ this.chkAcceptCommands.Location = new System.Drawing.Point(9, 24);
+ this.chkAcceptCommands.Name = "chkAcceptCommands";
+ this.chkAcceptCommands.Size = new System.Drawing.Size(171, 17);
+ this.chkAcceptCommands.TabIndex = 0;
+ this.chkAcceptCommands.Text = "Accept commands from master";
+ this.chkAcceptCommands.UseVisualStyleBackColor = true;
+ //
+ // chkAcceptConfig
+ //
+ this.chkAcceptConfig.AutoSize = true;
+ this.chkAcceptConfig.Location = new System.Drawing.Point(9, 47);
+ this.chkAcceptConfig.Name = "chkAcceptConfig";
+ this.chkAcceptConfig.Size = new System.Drawing.Size(190, 17);
+ this.chkAcceptConfig.TabIndex = 1;
+ this.chkAcceptConfig.Text = "Accept config updates from master";
+ this.chkAcceptConfig.UseVisualStyleBackColor = true;
+ //
// SetupWizard
//
this.AcceptButton = this.btnNext;
this.tabError.ResumeLayout(false);
this.tabError.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picBanner)).EndInit();
+ this.groupBox3.ResumeLayout(false);
+ this.groupBox3.PerformLayout();
this.ResumeLayout(false);
}
private System.Windows.Forms.TextBox txtTicket;
private System.Windows.Forms.Label lblTicket;
private System.Windows.Forms.ColumnHeader colInstanceName;
+ private System.Windows.Forms.GroupBox groupBox3;
+ private System.Windows.Forms.CheckBox chkAcceptConfig;
+ private System.Windows.Forms.CheckBox chkAcceptCommands;
}
}
if (rdoListener.Checked)
args += " --listen ::," + txtListenerPort.Text;
+ if (chkAcceptConfig.Checked)
+ args += " --accept-config";
+
+ if (chkAcceptCommands.Checked)
+ args += " --accept-commands";
+
args += " --ticket " + txtTicket.Text;
args += " --trustedcert " + _TrustedFile;
args += " --cn " + txtInstanceName.Text;
while (lvwEndpoints.SelectedItems.Count > 0) {
lvwEndpoints.Items.Remove(lvwEndpoints.SelectedItems[0]);
}
- }
+ }
}
}
("ticket", po::value<std::string>(), "Generated ticket number for this request")
("trustedcert", po::value<std::string>(), "Trusted master certificate file")
("cn", po::value<std::string>(), "The certificate's common name")
+ ("accept-config", "Accept config from master")
+ ("accept-commands", "Accept commands from master")
("master", "Use setup for a master instance");
}
if (vm.count("trustedcert"))
Log(LogWarning, "cli", "Master for Node setup: Ignoring --trustedcert");
+ if (vm.count("accept-config"))
+ Log(LogWarning, "cli", "Master for Node setup: Ignoring --accept-config");
+
+ if (vm.count("accept-commands"))
+ Log(LogWarning, "cli", "Master for Node setup: Ignoring --accept-commands");
+
/* Generate a new CA, if not already existing */
Log(LogInformation, "cli", "Generating new CA.");
if (tokens.size() > 1)
fp << " bind_port = " << tokens[1] << "\n";
}
+ if (vm.count("accept-config"))
+ fp << "accept_config = true\n";
+ else
+ fp << "accept_config = false\n";
+
+ if (vm.count("accept-commands"))
+ fp << "accept_commands = true\n";
+ else
+ fp << "accept_commands = false\n";
fp << "\n"
<< " ticket_salt = TicketSalt\n"
std::string answer;
bool is_node_setup = true;
+ /* master or node setup */
std::cout << ConsoleColorTag(Console_Bold) << "Please specify if this is a satellite setup "
<< "('n' installs a master setup)" << ConsoleColorTag(Console_Normal) << " [Y/n]: ";
std::getline (std::cin, answer);
String bind_port = answer;
bind_port.Trim();
+ std::cout << ConsoleColorTag(Console_Bold) << "Accept config from master?" << ConsoleColorTag(Console_Normal) << " [y/N]: ";
+ std::getline(std::cin, answer);
+ boost::algorithm::to_lower(answer);
+ choice = answer;
+
+ String accept_config = (choice.Contains("y") || choice.Contains("j")) ? "true" : "false";
+
+ std::cout << ConsoleColorTag(Console_Bold) << "Accept commands from master?" << ConsoleColorTag(Console_Normal) << " [y/N]: ";
+ std::getline(std::cin, answer);
+ boost::algorithm::to_lower(answer);
+ choice = answer;
+
+ String accept_commands = (choice.Contains("y") || choice.Contains("j")) ? "true" : "false";
+
/* disable the notifications feature on client nodes */
Log(LogInformation, "cli", "Disabling the Notification feature.");
<< "object ApiListener \"api\" {\n"
<< " cert_path = SysconfDir + \"/icinga2/pki/\" + NodeName + \".crt\"\n"
<< " key_path = SysconfDir + \"/icinga2/pki/\" + NodeName + \".key\"\n"
- << " ca_path = SysconfDir + \"/icinga2/pki/ca.crt\"\n";
+ << " ca_path = SysconfDir + \"/icinga2/pki/ca.crt\"\n"
+ << " accept_config = " << accept_config << '\n'
+ << " accept_commands = " << accept_commands << '\n';
if (!bind_host.IsEmpty())
fp << " bind_host = \"" << bind_host << "\"\n";