[Unit] Description=HAPX-UI self-update — STEP 2: activate staged binary (restart + rollback) # Triggered by the web UI (after the operator confirms) via # `systemctl start --no-block`. It swaps in /var/lib/hapx-ui-staging/hapx-ui.staged, # restarts hapx-ui, health-checks the new version and auto-rolls-back (binary + # DB) on failure. # # It MUST run independently of hapx-ui.service: this step stops/restarts hapx-ui, # and with hapx-ui's KillMode=control-group a swap driven from inside that # service's cgroup would be SIGTERM'd mid-activate. As its own transient unit # under PID 1 it has its own cgroup and survives the restart. After=network-online.target Wants=network-online.target [Service] Type=oneshot ExecStart=/usr/local/sbin/hapx-ui-update activate # No [Install] section — this unit is started on demand, never enabled at boot.