MCPcopy Create free account
hub / github.com/Icinga/icinga2 / IncludePackage

Function IncludePackage

lib/cli/daemonutility.cpp:96–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96static void IncludePackage(const String& packagePath, bool& success)
97{
98 /* Note: Package includes will register their zones
99 * for config sync inside their generated config. */
100 String packageName = Utility::BaseName(packagePath);
101
102 if (Utility::PathExists(packagePath + "/include.conf")) {
103 std::unique_ptr<Expression> expr = ConfigCompiler::CompileFile(packagePath + "/include.conf",
104 String(), packageName);
105
106 if (!ExecuteExpression(&*expr))
107 success = false;
108 }
109}
110
111bool DaemonUtility::ValidateConfigFiles(const std::vector<std::string>& configs, const String& objectsFile)
112{

Callers 1

ValidateConfigFilesMethod · 0.85

Calls 3

PathExistsFunction · 0.85
ExecuteExpressionFunction · 0.85
StringClass · 0.50

Tested by

no test coverage detected