* - 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.");
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
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.");
}
class I2_CLI_API ApiSetupUtility
{
public:
- static int SetupMaster(void);
+ static int SetupMaster(const String& cn);
static String GetConfdPath(void);
private: