mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
parent
663f09e475
commit
0d977b9d48
@ -60,7 +60,7 @@ int ApiSetupCommand::Run(const boost::program_options::variables_map& vm, const
|
||||
* - setup the api on a client?
|
||||
*/
|
||||
|
||||
int result = ApiSetupUtility::SetupMaster();
|
||||
int result = ApiSetupUtility::SetupMaster(Utility::GetFQDN());
|
||||
|
||||
if (result > 0) {
|
||||
Log(LogCritical, "ApiSetup", "Error occured. Bailing out.");
|
||||
|
@ -43,7 +43,7 @@ String ApiSetupUtility::GetConfdPath(void)
|
||||
return Application::GetSysconfDir() + "/icinga2/conf.d";
|
||||
}
|
||||
|
||||
int ApiSetupUtility::SetupMaster(void)
|
||||
int ApiSetupUtility::SetupMaster(const String& cn)
|
||||
{
|
||||
/* if the 'api' feature is enabled we can safely assume
|
||||
* that either 'api setup' was run, or the user manually
|
||||
@ -58,8 +58,6 @@ int ApiSetupUtility::SetupMaster(void)
|
||||
Log(LogInformation, "cli")
|
||||
<< "Generating new CA.\n";
|
||||
|
||||
String cn = Utility::GetFQDN();
|
||||
|
||||
if (PkiUtility::NewCa() > 0) {
|
||||
Log(LogWarning, "cli", "Found CA, skipping and using the existing one.");
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ namespace icinga
|
||||
class I2_CLI_API ApiSetupUtility
|
||||
{
|
||||
public:
|
||||
static int SetupMaster(void);
|
||||
static int SetupMaster(const String& cn);
|
||||
static String GetConfdPath(void);
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user