diff --git a/kms.php b/kms.php index 279648b..9d31135 100755 --- a/kms.php +++ b/kms.php @@ -29,6 +29,19 @@ $VLMCSD = array( // vlmcsd process 'pidFile' => '/run/vlmcsd.pid', ); +$HELP_MSG = " + kms-server ($VERSION) + + Project: https://github.com/dnomd343/kms-server.git + + --debug Enable debug mode + --kms-port Specify kms listen port + --http-port Specify http listen port + --disable-http Disable http service + --version Show version info + --help Show help message +\n"; + function load_nginx_config(int $kms_port, int $http_port): void { global $VERSION; $nginx_config = "server { @@ -177,6 +190,11 @@ if (in_array('-v', $argv) || in_array('--version', $argv)) { exit; } +if (in_array('-h', $argv) || in_array('--help', $argv)) { + echo $HELP_MSG; // show help message + exit; +} + logging::info('Loading kms-server (' . $VERSION . ')'); load_params(); load_vlmcsd_command($KMS_PORT);