mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
Prepare icingacli for having the Icinga library in PHP's include path
This commit is contained in:
parent
8c9465ffbd
commit
921f324d3e
@ -1,6 +1,17 @@
|
|||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?php
|
|
||||||
|
|
||||||
use Icinga\Application\Cli;
|
<?php
|
||||||
require_once dirname(__DIR__) . '/library/Icinga/Application/Cli.php';
|
// {{{ICINGA_LICENSE_HEADER}}}
|
||||||
Cli::start()->dispatch();
|
// {{{ICINGA_LICENSE_HEADER}}}
|
||||||
|
|
||||||
|
define('ICINGAWEB_BASEDIR', dirname(__DIR__));
|
||||||
|
// ICINGAWEB_BASEDIR is the parent folder for at least application, bin, modules, library/vendor and public
|
||||||
|
|
||||||
|
|
||||||
|
if (! @include_once ICINGAWEB_BASEDIR . 'Icinga/Application/Cli.php') {
|
||||||
|
// If the Icinga library wasn't found under ICINGAWEB_BASEDIR, require that the Icinga library is found in PHP's
|
||||||
|
// include path which is the case if Icinga Web 2 is installed via packages
|
||||||
|
require_once 'Icinga/Application/Cli.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
Icinga\Application\Cli::start()->dispatch();
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// {{{ICINGA_LICENSE_HEADER}}}
|
// {{{ICINGA_LICENSE_HEADER}}}
|
||||||
|
|
||||||
define('ICINGAWEB_BASEDIR', dirname(__DIR__));
|
define('ICINGAWEB_BASEDIR', dirname(__DIR__));
|
||||||
// ICINGAWEB_BASEDIR is the parent folder for at least application, bin, modules and public
|
// ICINGAWEB_BASEDIR is the parent folder for at least application, bin, modules, library/vendor and public
|
||||||
|
|
||||||
|
|
||||||
if (! @include_once ICINGAWEB_BASEDIR . '/library/Icinga/Application/webrouter.php') {
|
if (! @include_once ICINGAWEB_BASEDIR . '/library/Icinga/Application/webrouter.php') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user