mirror of https://github.com/Icinga/icinga2.git
parent
662d36fd16
commit
b8fc3a3ffa
|
@ -247,7 +247,12 @@ int NodeSetupCommand::SetupMaster(const boost::program_options::variables_map& v
|
|||
|
||||
if (vm.count("disable-confd")) {
|
||||
/* 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";
|
||||
std::ifstream apiUsersFile(apiUsersFilePath);
|
||||
|
|
|
@ -628,7 +628,7 @@ wizard_global_zone_loop_start:
|
|||
<< "The deactivation of the conf.d directory was skipped.";
|
||||
else {
|
||||
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);
|
||||
|
||||
if(!NodeUtility::UpdateConfiguration("\"conf.d\"", false, true)) {
|
||||
|
@ -814,9 +814,7 @@ wizard_global_zone_loop_start:
|
|||
|
||||
Log(LogInformation, "cli", "Updating constants.conf.");
|
||||
|
||||
String constants_file = Application::GetSysconfDir() + "/icinga2/constants.conf";
|
||||
|
||||
NodeUtility::CreateBackupFile(constants_file);
|
||||
NodeUtility::CreateBackupFile(NodeUtility::GetConstantsConfPath());
|
||||
|
||||
NodeUtility::UpdateConstant("NodeName", cn);
|
||||
NodeUtility::UpdateConstant("ZoneName", cn);
|
||||
|
|
Loading…
Reference in New Issue