30 lines
1 KiB
PHP
Executable file
30 lines
1 KiB
PHP
Executable file
#!/usr/bin/env php
|
|
<?php
|
|
|
|
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,
|
|
[
|
|
'host:' => 'Set host/ip address to listen on (default 0.0.0.0)',
|
|
'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)',
|
|
'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',
|
|
]
|
|
);
|
|
$terminal = new \Qi_Console_Terminal();
|
|
$error_handler = new \Qi_Console_ExceptionHandler($terminal, true);
|
|
$console = new \Orbit\Console($args, $terminal);
|
|
|
|
$value = $console->execute();
|
|
exit($value);
|