scripts/daemonize
#!/usr/bin/env php
<?php
$autoload = realpath(__DIR__."/../vendor/autoload.php");
if (!file_exists($autoload)) {
$autoload = realpath(__DIR__."/../../../autoload.php");
if (!file_exists($autoload)) {
throw new \Exception('Autoload not found. Did you run `composer dump-autload`?');
}
}
require_once($autoload);
use Symfony\Component\Console\Application;
$application = new Application('PHP Daemonize by JG', '1.3.1');
$application->add(new \ByJG\Daemon\Console\InstallCommand());
$application->add(new \ByJG\Daemon\Console\UninstallCommand());
$application->add(new \ByJG\Daemon\Console\RunCommand());
$application->add(new \ByJG\Daemon\Console\ServicesCommand());
$application->run();