Install sets a default LOG_FILE in the env file on Windows (no console as a service)

This commit is contained in:
mram
2026-09-21 08:37:25 +02:00
parent 1394a76eea
commit dd3187f951
3 changed files with 61 additions and 22 deletions
+10 -4
View File
@@ -186,8 +186,13 @@ By default install creates the canonical layout and copies the binary into
it (Windows: `%ProgramFiles%\gpu-turnstile\`, plus
`%ProgramData%\gpu-turnstile\` for logs; Linux: `/var/lib/gpu-turnstile/`
with the config at `/etc/gpu-turnstile.env`). An existing config in the
target location is never overwritten. `--no-copy` registers the current
executable location as-is instead.
target location is never overwritten. On Windows the install also makes
sure the env file sets `LOG_FILE` to
`%ProgramData%\gpu-turnstile\gpu-turnstile.log` (appended only when no
`LOG_FILE=` line exists) since a service has no console; on Linux logs go
to the journal via stderr, so no default is set there. `--no-copy`
registers the current executable location as-is and leaves the config
untouched.
### Windows
@@ -195,8 +200,9 @@ executable location as-is instead.
`%ProgramData%\gpu-turnstile\`, copies the exe and (if none exists there
yet) the `gpu-turnstile.env` into the Program Files directory, and
registers that copy as a Windows service; recovery actions restart it
5 s after any failure. Logs go to the ProgramData directory via
`LOG_FILE` since there is no console.
5 s after any failure. The install ensures the env file sets `LOG_FILE`
to `%ProgramData%\gpu-turnstile\gpu-turnstile.log` since there is no
console — an existing `LOG_FILE` setting is kept.
- **Account**: the service always runs as the virtual account
`NT SERVICE\gpu-turnstile` — a per-service low-privilege identity the
SCM manages (no password, automatic logon-as-a-service right, no admin