|
@ -40,6 +40,10 @@ pcntl_signal(SIGINT, function() { // receive SIGINT signal |
|
|
subExit($nginx['pidFile'], $phpFpm['pidFile'], $vlmcsd['pidFile']); |
|
|
subExit($nginx['pidFile'], $phpFpm['pidFile'], $vlmcsd['pidFile']); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (in_array('--debug', $argv)) { // enter debug mode |
|
|
|
|
|
logging::$logLevel = logging::DEBUG; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$KMS_PORT = 1688; // kms expose port -> only in message output |
|
|
$KMS_PORT = 1688; // kms expose port -> only in message output |
|
|
if (sizeof(getopt('', ['port:'])) == 1) { // port option |
|
|
if (sizeof(getopt('', ['port:'])) == 1) { // port option |
|
|
$KMS_PORT = getopt('', ['port:'])['port']; |
|
|
$KMS_PORT = getopt('', ['port:'])['port']; |
|
@ -47,11 +51,10 @@ if (sizeof(getopt('', ['port:'])) == 1) { // port option |
|
|
$KMS_PORT = end($KMS_PORT); |
|
|
$KMS_PORT = end($KMS_PORT); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
logging::debug('KMS Server Port -> ' . $KMS_PORT); |
|
|
|
|
|
$php_env_file = fopen('/etc/nginx/kms_params', 'w'); |
|
|
if (in_array('--debug', $argv)) { // enter debug mode |
|
|
fwrite($php_env_file, 'fastcgi_param KMS_PORT "' . $KMS_PORT . '";' . PHP_EOL); |
|
|
logging::$logLevel = logging::DEBUG; |
|
|
fclose($php_env_file); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
logging::info('Loading kms-server (' . $VERSION . ')'); |
|
|
logging::info('Loading kms-server (' . $VERSION . ')'); |
|
|
new Process($nginx['command']); |
|
|
new Process($nginx['command']); |
|
|