Browse Source

Update support for daemon pidfile config

pull/5295/head
Hypolite Petovan 2 years ago
parent
commit
46b34574d9
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      bin/daemon.php

+ 6
- 3
bin/daemon.php View File

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


Loading…
Cancel
Save