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