Bug 40901: Add systemd try-restart to koha-systemd postinst
In order for apt upgrades to trigger a service restart for all koha-systemd subservices and all instances, this adds a wildcard try-restart for those in addition to the daemon-reload. Only services which are already present and running will be restarted at postinst time Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
d998990d77
commit
142ab7320f
|
|
@ -6,6 +6,14 @@ case "$1" in
|
|||
# Reload systemd daemon
|
||||
systemctl daemon-reload || true
|
||||
;;
|
||||
|
||||
# on upgrade, restart running Koha services so they pick up new code/unit files
|
||||
if [ -n "$2" ]; then
|
||||
deb-systemd-invoke try-restart \
|
||||
'koha-*@*.service' \
|
||||
>/dev/null || true
|
||||
fi
|
||||
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
|
|
|||
Loading…
Reference in New Issue