feat(maestro): make installer re-run safe (auto-detect = update)
ci / rust (push) Successful in 1m28s
ci / rust (push) Successful in 1m28s
The wizard now treats existing state as "we're updating, not installing": - If `~/.config/maestrod/config.toml` exists, skip the configure prompt with a clear notice. Sets `configured = true` so the systemd start logic still makes sense. - If the systemd user unit already exists, refresh the file in place, skip the enable prompt (it's either already enabled or the user said no last time), and ask to `restart` instead of `start` — so the new binary actually takes effect. Adds `SystemctlAction::Restart` and a test for it. Same `./install.sh` works for both first install and subsequent updates; no `--update` flag. Refs NAP-225.
This commit is contained in:
+6
-1
@@ -14,7 +14,12 @@ The repo is private, so grab `install.sh` while signed in to gitea, then run it:
|
||||
|
||||
The bootstrap script builds `maestro-installer` into a temp directory, runs the
|
||||
wizard, and cleans up — only `maestrod` and `maestro` end up persisted in
|
||||
`~/.cargo/bin`. Re-run any time to update; `cargo install` overwrites in place.
|
||||
`~/.cargo/bin`.
|
||||
|
||||
**Updating is the same command.** Re-running `./install.sh` detects an
|
||||
existing `~/.config/maestrod/config.toml` and existing systemd unit, skips the
|
||||
configure prompt, refreshes the unit, and runs `systemctl --user restart
|
||||
maestrod` instead of `start`. No `--update` flag needed.
|
||||
|
||||
Inside the script, `cargo install --git https://git.naps.pt/naps62/maestro …`
|
||||
uses your already-configured git credentials for this host (HTTPS helper or
|
||||
|
||||
Reference in New Issue
Block a user