1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00
phorge-phorge/scripts/daemon/launch_daemon.php
epriestley 0bf337b06c Lift ticks declaration to top level in Phabricator daemons
Summary: Ref T10811. This is a companion change for D16053, but affects the Phabricator version of this script.

Test Plan: Started daemons, ^C'd them, saw them handle the signal.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10811

Differential Revision: https://secure.phabricator.com/D16054
2016-06-06 06:39:09 -07:00

20 lines
552 B
PHP
Executable file

#!/usr/bin/env php
<?php
// NOTE: This is substantially the same as the libphutil/ "launch_daemon.php"
// script, except it loads the Phabricator environment and adds some Phabricator
// specific flags.
declare(ticks = 1);
$root = dirname(dirname(dirname(__FILE__)));
require_once $root.'/scripts/__init_script__.php';
$overseer = new PhutilDaemonOverseer($argv);
$bootloader = PhutilBootloader::getInstance();
foreach ($bootloader->getAllLibraries() as $library) {
$overseer->addLibrary(phutil_get_library_root($library));
}
$overseer->run();