orbit/bin/orbit

30 lines
1 KiB
Plaintext
Raw Normal View History

2020-08-26 19:56:06 +02:00
#!/usr/bin/env php
<?php
2020-08-27 00:57:01 +02:00
require_once dirname(__DIR__) . "/vendor/autoload.php";
// Define command line args for this client
// And fetch args passed in by invocation
$args = new \Qi_Console_ArgV(
$argv,
2020-08-27 00:58:25 +02:00
[
'host:' => 'Set host/ip address to listen on (default 0.0.0.0)',
2020-08-27 00:57:01 +02:00
'port|p:' => 'Set port to listen on (default 1965)',
'hostname:' => 'Set hostname of server',
'tls-cert:' => 'Set cert PEM file to use (default null)',
'tls-key:' => 'Set private key PEM file to use (default null)',
2020-08-27 00:57:01 +02:00
'log:' => 'Set log filename (default orbit.log)',
'help|h' => 'Show help',
'verbose|v' => 'Include more verbose output',
'quiet|q' => 'Print less messages',
'no-color' => 'Don\'t use color output',
'version' => 'Show version and exit',
2020-08-27 00:58:25 +02:00
]
2020-08-26 19:56:06 +02:00
);
2020-08-27 00:57:01 +02:00
$terminal = new \Qi_Console_Terminal();
$error_handler = new \Qi_Console_ExceptionHandler($terminal, true);
$console = new \Orbit\Console($args, $terminal);
2020-08-26 19:56:06 +02:00
2020-08-27 00:57:01 +02:00
$value = $console->execute();
exit($value);