mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-20 09:07:23 -05:00
overhaul loader UI with shader rays, liquid glass styling, and interactive launch flow
This commit is contained in:
@@ -90,6 +90,20 @@ class ServiceManager {
|
||||
child.stderr.on('data', (data) => {
|
||||
const text = data.toString().trim();
|
||||
this.logToFile(name, `STDERR: ${text}`);
|
||||
|
||||
if (text.includes('EADDRINUSE')) {
|
||||
const match = text.match(/:(\d+)/);
|
||||
const port = match ? match[1] : null;
|
||||
if (port) {
|
||||
try {
|
||||
if (process.platform === 'win32') {
|
||||
require('child_process').execSync(`powershell -Command "Get-NetTCPConnection -LocalPort ${port} -ErrorAction SilentlyContinue | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force }"`, { stdio: 'ignore' });
|
||||
} else {
|
||||
require('child_process').execSync(`fuser -k -9 ${port}/tcp`, { stdio: 'ignore' });
|
||||
}
|
||||
} catch (_) { }
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
child.on('exit', (code, signal) => {
|
||||
@@ -111,7 +125,7 @@ class ServiceManager {
|
||||
this.startService(name, relativeDir, startScript).catch(err => {
|
||||
this.logToFile(name, `Failed to restart: ${err.message}`);
|
||||
});
|
||||
}, 3000);
|
||||
}, 1500);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user