IcingaConfig: do not render v2-related helpers...

...for legacy config
This commit is contained in:
Thomas Gelf 2016-09-05 19:34:14 +00:00
parent 687f2aff1c
commit e58a70613c

View File

@ -431,8 +431,10 @@ class IcingaConfig
->createFileFromDb('notification') ->createFileFromDb('notification')
; ;
$this->configFile('zones.d/director-global/commands') if (! $this->isLegacy()) {
->prepend("library \"methods\"\n\n"); $this->configFile('zones.d/director-global/commands')
->prepend("library \"methods\"\n\n");
}
PrefetchCache::forget(); PrefetchCache::forget();
IcingaHost::clearAllPrefetchCaches(); IcingaHost::clearAllPrefetchCaches();
@ -444,6 +446,10 @@ class IcingaConfig
protected function prepareGlobalBasics() protected function prepareGlobalBasics()
{ {
if ($this->isLegacy()) {
return $this;
}
$this->configFile( $this->configFile(
sprintf( sprintf(
'zones.d/%s/001-director-basics', 'zones.d/%s/001-director-basics',