mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
icingacli web serve: preserve console colors and avoid redundand process
This commit is contained in:
parent
b4afdf4115
commit
8e84bdf4f5
@ -55,20 +55,12 @@ class WebCommand extends Command
|
|||||||
$this->forkAndExit();
|
$this->forkAndExit();
|
||||||
}
|
}
|
||||||
echo "Serving Icinga Web 2 from directory $documentRoot and listening on $socket\n";
|
echo "Serving Icinga Web 2 from directory $documentRoot and listening on $socket\n";
|
||||||
$cmd = sprintf(
|
|
||||||
'%s -S %s -t %s %s',
|
|
||||||
readlink('/proc/self/exe'),
|
|
||||||
$socket,
|
|
||||||
$documentRoot,
|
|
||||||
Icinga::app()->getLibraryDir('/Icinga/Application/webrouter.php')
|
|
||||||
);
|
|
||||||
|
|
||||||
// TODO: Store webserver log, switch uid, log index.php includes, pid file
|
// TODO: Store webserver log, switch uid, log index.php includes, pid file
|
||||||
if ($fork) {
|
pcntl_exec(
|
||||||
exec($cmd);
|
readlink('/proc/self/exe'),
|
||||||
} else {
|
['-S', $socket, '-t', $documentRoot, Icinga::app()->getLibraryDir('/Icinga/Application/webrouter.php')]
|
||||||
passthru($cmd);
|
);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function stopAction()
|
public function stopAction()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user