Skip to content

Robustness: install.sh never restarts a running service on upgrade (old binary keeps running) #59

Description

@LarsLaskowski

Source: Full code review 2026-07-17 (docs/reviews/2026-07-17-full-code-review.md), finding F2.
Category: robustness · Severity: medium · Effort: small

Problem

packaging/install.sh advertises "Installs or upgrades PiMonitor" and replaces /usr/local/bin/pimonitor, but only runs systemctl enable --now pimonitor.service (install.sh:86-91), which is a no-op when the unit is already active.

After an upgrade the old binary keeps running until an unrelated reboot/restart, and the dashboard footer version silently disagrees with what was just installed.

Suggested fix

Detect whether the unit is already active and systemctl restart pimonitor.service in that case (saying so in the script output). Same consideration applies after systemd unit file changes (daemon-reload is already done; a restart is still needed to pick up new unit settings for a running service).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions