* @copyright 2021 DIGITAL RETAIL TECHNOLOGIES SL * @license https://opensource.org/licenses/MIT The MIT License * * Don't forget to prefix your containers with your own identifier * to avoid any conflicts with others containers. */ declare(ticks=1); if (!isset($_SERVER['REQUEST_METHOD'])) { $_SERVER['REQUEST_METHOD'] = 'POST'; } if (!isset($_SERVER['REMOTE_ADDR'])) { $_SERVER['REMOTE_ADDR'] = '0.0.0.0'; } require_once dirname(__FILE__) . '/lib/RetailcrmCli.php'; function retailcrmCliInterruptHandler($signo) { RetailcrmLogger::output(sprintf( 'WARNING: Interrupt received, stopping... (%s)', print_r($signo, true) )); RetailcrmCli::clearCurrentJob(null); RetailcrmJobManager::clearCurrentJob(null); exit(1); } if ('cli' == php_sapi_name()) { $cli = new RetailcrmCli(__FILE__); $cli->execute('retailcrmCliInterruptHandler'); } else { include_once dirname(__FILE__) . '/index.php'; }