icingacli web serve: Fix "PHP Notice: Use of undefined constant ICINGA_LIBDIR"
This commit is contained in:
parent
ce69300c9a
commit
11bb8dbab0
|
@ -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
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue