mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
Make default listen address for CLI command web serve configureable
Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com> resolves #13381
This commit is contained in:
parent
43d5b01a22
commit
93b7b11449
@ -26,8 +26,7 @@ class WebCommand extends Command
|
|||||||
|
|
||||||
// TODO: Sanity check!!
|
// TODO: Sanity check!!
|
||||||
if ($socket === null) {
|
if ($socket === null) {
|
||||||
$socket = '0.0.0.0:80';
|
$socket = $this->Config()->get('standalone','listen','0.0.0.0:80');
|
||||||
// throw new IcingaException('Socket is required');
|
|
||||||
}
|
}
|
||||||
if ($documentRoot === null) {
|
if ($documentRoot === null) {
|
||||||
$documentRoot = Icinga::app()->getBaseDir('public');
|
$documentRoot = Icinga::app()->getBaseDir('public');
|
||||||
@ -40,7 +39,7 @@ class WebCommand extends Command
|
|||||||
if ($fork) {
|
if ($fork) {
|
||||||
$this->forkAndExit();
|
$this->forkAndExit();
|
||||||
}
|
}
|
||||||
echo "Serving Icingaweb from $documentRoot\n";
|
echo "Serving Icinga Web 2 from directory $documentRoot and listening on $socket\n";
|
||||||
$cmd = sprintf(
|
$cmd = sprintf(
|
||||||
'%s -S %s -t %s %s',
|
'%s -S %s -t %s %s',
|
||||||
readlink('/proc/self/exe'),
|
readlink('/proc/self/exe'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user