Update: 2026-06-23 15:35:14

This commit is contained in:
Hamza-Ayed
2026-06-23 15:35:14 +03:00
parent b4d054a870
commit bea94ed617
4 changed files with 69 additions and 6 deletions

View File

@@ -33,7 +33,13 @@ function socket_log($message, $data = null) {
socket_log("=== STARTING PASSENGER SOCKET SERVER ===");
$INTERNAL_KEY = trim((string) @file_get_contents('/home/intaleq-rides/.internal_socket_key'));
$siteUser = get_current_user();
$homeDir = "/home/$siteUser";
if (!is_dir($homeDir)) {
$homeDir = '/home/intaleq-rides'; // Fallback to original location
}
$INTERNAL_KEY = trim((string) @file_get_contents(getenv('INTERNAL_SOCKET_KEY_PATH') ?: ($homeDir . '/.internal_socket_key')));
if (empty($INTERNAL_KEY)) {
socket_log("[CRITICAL_ERROR] Internal key missing! Exiting.");