mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 07:04:37 +02:00
parent
662d36fd16
commit
b8fc3a3ffa
@ -247,7 +247,12 @@ int NodeSetupCommand::SetupMaster(const boost::program_options::variables_map& v
|
|||||||
|
|
||||||
if (vm.count("disable-confd")) {
|
if (vm.count("disable-confd")) {
|
||||||
/* Disable conf.d inclusion */
|
/* Disable conf.d inclusion */
|
||||||
NodeUtility::UpdateConfiguration("\"conf.d\"", false, true);
|
if (NodeUtility::UpdateConfiguration("\"conf.d\"", false, true))
|
||||||
|
Log(LogInformation, "cli")
|
||||||
|
<< "Disabled conf.d inclusion";
|
||||||
|
else
|
||||||
|
Log(LogWarning, "cli")
|
||||||
|
<< "Tried to disable conf.d inclusion but failed, possibly it's already disabled.";
|
||||||
|
|
||||||
String apiUsersFilePath = Application::GetSysconfDir() + "/icinga2/conf.d/api-users.conf";
|
String apiUsersFilePath = Application::GetSysconfDir() + "/icinga2/conf.d/api-users.conf";
|
||||||
std::ifstream apiUsersFile(apiUsersFilePath);
|
std::ifstream apiUsersFile(apiUsersFilePath);
|
||||||
|
@ -628,7 +628,7 @@ wizard_global_zone_loop_start:
|
|||||||
<< "The deactivation of the conf.d directory was skipped.";
|
<< "The deactivation of the conf.d directory was skipped.";
|
||||||
else {
|
else {
|
||||||
std::cout << ConsoleColorTag(Console_Bold | Console_ForegroundGreen)
|
std::cout << ConsoleColorTag(Console_Bold | Console_ForegroundGreen)
|
||||||
<< "Disable the inclusion of the conf.d directory...\n"
|
<< "Disabling the inclusion of the conf.d directory...\n"
|
||||||
<< ConsoleColorTag(Console_Normal);
|
<< ConsoleColorTag(Console_Normal);
|
||||||
|
|
||||||
if(!NodeUtility::UpdateConfiguration("\"conf.d\"", false, true)) {
|
if(!NodeUtility::UpdateConfiguration("\"conf.d\"", false, true)) {
|
||||||
@ -814,9 +814,7 @@ wizard_global_zone_loop_start:
|
|||||||
|
|
||||||
Log(LogInformation, "cli", "Updating constants.conf.");
|
Log(LogInformation, "cli", "Updating constants.conf.");
|
||||||
|
|
||||||
String constants_file = Application::GetSysconfDir() + "/icinga2/constants.conf";
|
NodeUtility::CreateBackupFile(NodeUtility::GetConstantsConfPath());
|
||||||
|
|
||||||
NodeUtility::CreateBackupFile(constants_file);
|
|
||||||
|
|
||||||
NodeUtility::UpdateConstant("NodeName", cn);
|
NodeUtility::UpdateConstant("NodeName", cn);
|
||||||
NodeUtility::UpdateConstant("ZoneName", cn);
|
NodeUtility::UpdateConstant("ZoneName", cn);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user