mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-29 08:34:20 +02:00
parent
6f4ae74e1e
commit
8611682cdb
@ -80,14 +80,15 @@ void ApiListener::OnConfigLoaded(void)
|
|||||||
Application::Exit(EXIT_FAILURE);
|
Application::Exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ApiListener::OnAllConfigLoaded(void)
|
||||||
|
{
|
||||||
if (!Endpoint::GetByName(GetIdentity())) {
|
if (!Endpoint::GetByName(GetIdentity())) {
|
||||||
Log(LogCritical, "ApiListener")
|
Log(LogCritical, "ApiListener")
|
||||||
<< "Endpoint object for '" << GetIdentity() << "' is missing.";
|
<< "Endpoint object for '" << GetIdentity() << "' is missing.";
|
||||||
Application::Exit(EXIT_FAILURE);
|
Application::Exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
SyncZoneDirs();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -95,6 +96,8 @@ void ApiListener::OnConfigLoaded(void)
|
|||||||
*/
|
*/
|
||||||
void ApiListener::Start(void)
|
void ApiListener::Start(void)
|
||||||
{
|
{
|
||||||
|
SyncZoneDirs();
|
||||||
|
|
||||||
if (std::distance(DynamicType::GetObjectsByType<ApiListener>().first, DynamicType::GetObjectsByType<ApiListener>().second) > 1) {
|
if (std::distance(DynamicType::GetObjectsByType<ApiListener>().first, DynamicType::GetObjectsByType<ApiListener>().second) > 1) {
|
||||||
Log(LogCritical, "ApiListener", "Only one ApiListener object is allowed.");
|
Log(LogCritical, "ApiListener", "Only one ApiListener object is allowed.");
|
||||||
return;
|
return;
|
||||||
|
@ -70,6 +70,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void OnConfigLoaded(void);
|
virtual void OnConfigLoaded(void);
|
||||||
|
virtual void OnAllConfigLoaded(void);
|
||||||
virtual void Start(void);
|
virtual void Start(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user