serverVersion = YPTSocket::getServerVersion(); echo "πŸ”Œ Closing output buffers and sessions...\n"; ob_end_flush(); _mysql_close(); _session_write_close(); echo "πŸ› οΈ Killing any process using the port...\n"; killProcessOnPort(); // Renovar certificados SSL com output echo "πŸ” Renewing SSL certificates...\n"; exec('certbot renew 2>&1', $certbotOutput, $certbotReturn); echo "πŸ” certbot output:\n" . implode("\n", $certbotOutput) . "\n"; echo "πŸ” certbot return code: {$certbotReturn}\n"; // Comando para iniciar o servidor $startCommand = "sudo " . YPTSocket::getStartServerCommand(); echo "πŸš€ Starting server with command:\n{$startCommand}\n"; // Executar o comando e capturar saΓ­da exec($startCommand . ' 2>&1', $output, $return_var); echo "πŸ“€ Command output:\n" . implode("\n", $output) . "\n"; echo "πŸ”š Command finished with exit code: {$return_var}\n";