mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-20 20:24:33 +02:00
parent
9bbe9a4875
commit
b4143c2724
@ -213,9 +213,20 @@ int Main(void)
|
|||||||
String initconfig = Application::GetSysconfDir() + "/icinga2/init.conf";
|
String initconfig = Application::GetSysconfDir() + "/icinga2/init.conf";
|
||||||
|
|
||||||
if (Utility::PathExists(initconfig)) {
|
if (Utility::PathExists(initconfig)) {
|
||||||
ScriptFrame frame;
|
Expression *expression;
|
||||||
Expression *expression = ConfigCompiler::CompileFile(initconfig);
|
try {
|
||||||
expression->Evaluate(frame);
|
expression = ConfigCompiler::CompileFile(initconfig);
|
||||||
|
|
||||||
|
ScriptFrame frame;
|
||||||
|
expression->Evaluate(frame);
|
||||||
|
} catch (const std::exception& ex) {
|
||||||
|
delete expression;
|
||||||
|
|
||||||
|
Log(LogCritical, "config", DiagnosticInformation(ex));
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
delete expression;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user