Make service install converge: stop running service, refresh binary/config only on change, restart only if it was running

This commit is contained in:
mram
2026-09-21 08:30:55 +02:00
parent da02457fd5
commit 1394a76eea
4 changed files with 227 additions and 54 deletions
+6
View File
@@ -176,6 +176,12 @@ prompt instead of failing — the command relaunches itself elevated, waits
for the child, and mirrors its exit code. The legacy form
`gpu-turnstile service install|remove` does the same thing.
Re-running install on an already-registered service converges instead of
failing: a running service is stopped first, the installed binary copy is
refreshed only when the content differs, the registration (Windows service
config / systemd unit) is updated only where it drifted, and the service is
started again only if it was running before.
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/`