Skip to content

dh_installsystemd: add --reload-after-upgrade option

which uses systemd's reload functionality to reload units instead of restarting, if supported by the unit.

when used in combination with --restart-after-upgrade, systemd's (try-)reload-or-restart action is used, to allow utilization for both the "reload if running" and "reload if possible, start if not running" use cases.

this functionality is intended for services which support re-executing themselves via ExecReload without dropping existing connections/clients.

Signed-off-by: Fabian Grünbichler f.gruenbichler@proxmox.com

this is an alternative / extended version of !1 (closed) , based on feedback by @biebl:

  • supports the plain "reload only" use case as well (by passing --reload-after-upgrade and --no-restart-after-upgrade)
  • extended description to include recommended/intended use cases
  • test cases included
  • still depends on init-system-helpers!5 for proper reload-or-restart integration via deb-systemd-invoke

feedback appreciated as always, sorry for taking so long to get back to this.

Edited by Niels Thykier

Merge request reports

Loading