Fixed code structure

This commit is contained in:
Michael 2022-05-20 04:42:10 +00:00
parent dc16e6d471
commit 6ce23bd9ca
4 changed files with 6 additions and 12 deletions

View file

@ -70,7 +70,7 @@ class Daemon
return false;
}
$pid = intval(file_get_contents($pidfile));
$pid = intval(file_get_contents($pidfile));
$running = posix_kill($pid, 0);
self::$daemon_mode = $running;
@ -129,9 +129,7 @@ class Daemon
private static function spawn()
{
Logger::notice('Starting new daemon process');
$command = 'bin/daemon.php';
$a = DI::app();
DI::system()->run($command, ['start']);
DI::system()->run('bin/daemon.php', ['start']);
Logger::notice('New daemon process started');
}
}