feat: implement IPC handlers for service management and add MySQL configuration template
This commit is contained in:
@@ -67,7 +67,7 @@ export function registerIpcHandlers(): void {
|
||||
return { success: false, message: 'Nginx konfigürasyon hatası! Log sekmesini kontrol edin.' }
|
||||
}
|
||||
|
||||
const success = await processManager.startService('nginx', binPath, ['-p', nginxPrefix, '-c', configPath], true)
|
||||
const success = await processManager.startService('nginx', binPath, ['-p', nginxPrefix, '-c', configPath], false)
|
||||
return { success, message: success ? 'Nginx başlatıldı.' : 'Nginx devreye alınamadı (Hata loglarını kontrol edin).' }
|
||||
}
|
||||
|
||||
@@ -90,6 +90,9 @@ export function registerIpcHandlers(): void {
|
||||
|
||||
if (!binPath) return { success: false, message: 'MySQL executable bulunamadı. Lütfen indirin.' }
|
||||
|
||||
// Force kill any existing instances before starting
|
||||
await processManager.forceKillAll('mysql')
|
||||
|
||||
// Initialize if data directory is empty
|
||||
if (!fs.existsSync(dataDir) || fs.readdirSync(dataDir).length === 0) {
|
||||
if (!fs.existsSync(dataDir)) fs.mkdirSync(dataDir, { recursive: true })
|
||||
|
||||
Reference in New Issue
Block a user