diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-11-29 20:22:41 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-11-29 20:26:18 -0500 |
commit | 978a3c70fee3baecb5d25da551db7e2fc23c55f7 (patch) | |
tree | c5105efbd6b14812093599212b8d50165a007dc4 /cli | |
parent | fdc4e04e870b82fe93eb0f03b4f54faf8252ba6c (diff) |
Simplify .htaccess and rename command line script
Diffstat (limited to 'cli')
-rwxr-xr-x | cli | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -0,0 +1,18 @@ +#!/usr/bin/env php +<?php + +use Symfony\Component\EventDispatcher\Event; + +if (php_sapi_name() !== 'cli') { + echo 'This script run only from the command line'.PHP_EOL; + exit(255); +} + +try { + require __DIR__.'/app/common.php'; + $container['dispatcher']->dispatch('app.bootstrap', new Event); + $container['cli']->run(); +} catch (Exception $e) { + echo $e->getMessage().PHP_EOL; + exit(255); +} |