mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 00:50:46 +08:00
Fix Windows install start: writable runtime logs and robust Postgres bootstrap.
Some checks failed
Release Windows / build (push) Has been cancelled
Some checks failed
Release Windows / build (push) Has been cancelled
API logs go under ProgramData; first-run verifies CREATE ROLE/DATABASE and login. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
ca97a2a597
commit
86dfd41f44
7 changed files with 64 additions and 33 deletions
|
|
@ -23,9 +23,16 @@ if ($Backgtound -and -not $Background) {
|
|||
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||||
Set-Location $projectRoot
|
||||
|
||||
$runDir = Join-Path $PSScriptRoot ".run"
|
||||
# Prefer writable data-root runtime dir (Program Files is not writable after Setup install).
|
||||
if ($env:NETX_RUN_DIR) {
|
||||
$runDir = $env:NETX_RUN_DIR
|
||||
} elseif ($env:NETX_SCHEDULER_HEARTBEAT_PATH) {
|
||||
$runDir = Split-Path -Parent ($env:NETX_SCHEDULER_HEARTBEAT_PATH -replace '/', '\')
|
||||
} else {
|
||||
$runDir = Join-Path $PSScriptRoot ".run"
|
||||
}
|
||||
if (-not (Test-Path $runDir)) {
|
||||
New-Item -ItemType Directory -Path $runDir | Out-Null
|
||||
New-Item -ItemType Directory -Path $runDir -Force | Out-Null
|
||||
}
|
||||
|
||||
$pidFile = Join-Path $runDir "netx.pid"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue