Pass overseer configuration over stdin
Summary: Ref T7352. This changes `phd` to pass configuration to overseers over stdin. We still run one overseer per daemon. The "status" stuff needs some cleanup, but it's mostly just UI/cosmetic. Test Plan: - Ran `phd debug`, `phd launch`, `phd start`, `phd status`, `phd stop`, etc. - Verified PID files write in a reasonable format. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T7352 Differential Revision: https://secure.phabricator.com/D11855
This commit is contained in:
@@ -8,20 +8,11 @@
|
||||
$root = dirname(dirname(dirname(__FILE__)));
|
||||
require_once $root.'/scripts/__init_script__.php';
|
||||
|
||||
$flags = array();
|
||||
$overseer = new PhutilDaemonOverseer($argv);
|
||||
|
||||
$bootloader = PhutilBootloader::getInstance();
|
||||
foreach ($bootloader->getAllLibraries() as $library) {
|
||||
if ($library == 'phutil') {
|
||||
// No need to load libphutil, it's necessarily loaded implicitly by the
|
||||
// daemon itself.
|
||||
continue;
|
||||
}
|
||||
$flags[] = '--load-phutil-library='.phutil_get_library_root($library);
|
||||
$overseer->addLibrary(phutil_get_library_root($library));
|
||||
}
|
||||
|
||||
// Add more flags.
|
||||
array_splice($argv, 2, 0, $flags);
|
||||
|
||||
$overseer = new PhutilDaemonOverseer($argv);
|
||||
$overseer->run();
|
||||
|
||||
Reference in New Issue
Block a user