icingacli web serve: Fix "PHP Notice: Use of undefined constant ICINGA_LIBDIR"

This commit is contained in:
Eric Lippmann 2014-11-14 16:02:17 +01:00
parent ce69300c9a
commit 11bb8dbab0
2 changed files with 13 additions and 1 deletions

View File

@ -47,7 +47,7 @@ class WebCommand extends Command
readlink('/proc/self/exe'),
$socket,
$basedir,
ICINGA_LIBDIR . '/Icinga/Application/webrouter.php'
Icinga::app()->getLibraryDir('/Icinga/Application/webrouter.php')
);
// TODO: Store webserver log, switch uid, log index.php includes, pid file

View File

@ -275,6 +275,18 @@ abstract class ApplicationBootstrap
return $this->getDirWithSubDir($this->configDir, $subDir);
}
/**
* Get the Icinga library directory
*
* @param string $subDir Optional sub directory to get
*
* @return string
*/
public function getLibraryDir($subDir = null)
{
return $this->getDirWithSubDir($this->libDir, $subDir);
}
/**
* Get the path to the bootstrapping directory
*