Skip to content

fix(update): restart lerd-ui/watcher/tray after self-update#197

Merged
geodro merged 1 commit intomainfrom
fix/update-restart-services
Apr 16, 2026
Merged

fix(update): restart lerd-ui/watcher/tray after self-update#197
geodro merged 1 commit intomainfrom
fix/update-restart-services

Conversation

@geodro
Copy link
Copy Markdown
Owner

@geodro geodro commented Apr 15, 2026

Summary

lerd update replaces the on-disk binary, runs install, and rebuilds PHP-FPM containers, but never restarts the long-running lerd user services. Linux keeps the old inode alive for processes that still have the binary open, so lerd serve-ui, lerd-watcher, and lerd-tray keep executing the pre-update code and report the old version until something else restarts them (reboot, manual kill, tray Quit).

This PR adds a final step to runUpdate that probes lerd-ui, lerd-watcher, and lerd-tray user units and restarts any that are currently active. Disabled services are left alone so the flow keeps working on machines where autostart is off. Restart failures are reported as warnings and do not abort the update.

The self-update path replaces the on-disk binary but leaves the
long-running user services executing the old inode, so lerd-ui keeps
reporting the pre-update version until something else restarts it.
Restart any currently-active lerd user units at the end of runUpdate so
the freshly installed binary takes effect immediately. Disabled units
are left alone.
@geodro geodro merged commit 661732b into main Apr 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant