diff --git a/README.md b/README.md index 5c8998f..7f39fa5 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ Get-WinEvent -FilterHashtable @{LogName='Application'; ProviderName='nebula'} -M Common causes: - **"found unknown escape character"** — Backslashes in `config.yml` paths. YAML interprets `\` as escape characters inside double quotes. Use forward slashes (`C:/Program Files/Nebula/ca.crt`). -- **"no config files found"** — The service was installed without `-config`. Reinstall using `install-nebula.ps1`. +- **"no config files found"** — The service binary path is missing the `-config` argument. Reinstall using `install-nebula.ps1`. ### Handshake timeouts after reboot Nebula started before the physical network was ready. Verify the service is configured with auto start and NLA dependency: diff --git a/install-nebula.ps1 b/install-nebula.ps1 index 9e37544..dbffda1 100644 --- a/install-nebula.ps1 +++ b/install-nebula.ps1 @@ -209,9 +209,10 @@ if (-not (Test-Path (Join-Path $InstallDir "dist"))) { # --- Install and configure service --- Write-Host "Installing Nebula service..." -& "$InstallDir\nebula.exe" -service install -config "$ConfigPath" -if ($LASTEXITCODE -ne 0) { - Write-Error "Failed to install Nebula service." +try { + New-Service -Name "nebula" -BinaryPathName $ExpectedBinPath -StartupType Automatic -Description "Nebula Network Service" -ErrorAction Stop | Out-Null +} catch { + Write-Error "Failed to install Nebula service: $_" exit 1 }