Update support for daemon pidfile config

This commit is contained in:
Hypolite Petovan 2018-06-25 20:56:35 -04:00
parent 3985a4bc43
commit 46b34574d9

View file

@ -34,11 +34,14 @@ if ($a->mode === App::MODE_INSTALL) {
Config::load(); Config::load();
if (!isset($pidfile)) { if (empty(Config::get('system', 'pidfile'))) {
die('Please specify a pid file in the variable $pidfile in the .htconfig.php. For example:'."\n". die('Please set system.pidfile in config/local.ini.php. For example:'."\n".
'$pidfile = "/path/to/daemon.pid";'."\n"); '[system]'."\n".
'pidfile = /path/to/daemon.pid'."\n");
} }
$pidfile = Config::get('system', 'pidfile');
if (in_array("start", $_SERVER["argv"])) { if (in_array("start", $_SERVER["argv"])) {
$mode = "start"; $mode = "start";
} }