Commit 865763b6 authored by Julien Muchembled's avatar Julien Muchembled

debian: fix restart on old OS

On Debian < 10:
- debhelper extends postint with 'try-restart', which caused re6st to
  remain stopped after upgrading from a re6st package that stopped
  services unconditionally in prerm (see previous commit);
- deb-systemd-invoke does not check whether the service is enabled
  so 'try-restart' can't be replaced blindly with 'restart'
  (as it is the case in recent Debian).
parent 111ddbc9
...@@ -18,6 +18,7 @@ endif ...@@ -18,6 +18,7 @@ endif
override_dh_install: override_dh_install:
make DESTDIR=$(TMP) PREFIX=/usr PYTHON=/usr/bin/python install make DESTDIR=$(TMP) PREFIX=/usr PYTHON=/usr/bin/python install
# BBB: compat < 10 # BBB: compat < 10 ; https://bugs.debian.org/879727
override_dh_systemd_start: override_dh_systemd_start:
dh_systemd_start --restart-after-upgrade dh_systemd_start --restart-after-upgrade
sed -i 's/_dh_action=try-restart/_dh_action=restart; for x in re6stnet re6st-registry; do systemctl is-enabled --quiet $$x.service || &; done/' debian/$(PACKAGE).postinst.debhelper
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment