aboutsummaryrefslogtreecommitdiffstats
path: root/debian/postinst
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@debian.org>2015-05-16 19:28:57 +0000
committerMikhail Gusarov <dottedmag@debian.org>2015-05-16 23:51:00 +0000
commitb9cc9d2ffba1170388d3d34846cee0623741761c (patch)
treedaf6c49d438b19de2808d012450929cf6ad3e794 /debian/postinst
parent463aa1e6775557493a827c872296964e89902e0e (diff)
downloadrspamd-b9cc9d2ffba1170388d3d34846cee0623741761c.tar.gz
rspamd-b9cc9d2ffba1170388d3d34846cee0623741761c.zip
Restart rspamd on upgrade, stop on removal
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst5
1 files changed, 3 insertions, 2 deletions
diff --git a/debian/postinst b/debian/postinst
index 6d725a90d..8d96fcb18 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -31,8 +31,9 @@ esac
if [ -x /etc/init.d/rspamd ]; then
update-rc.d rspamd defaults >/dev/null
- if [ -d /run/systemd/systemd ]; then
- systemctl --system daemon-reload >/dev/null || true
+ if [ -d /run/systemd/system ]; then
+ deb-systemd-invoke --system daemon-reload >/dev/null || true
+ deb-systemd-invoke --system stop rspamd.service 2>/dev/null || true
else
invoke-rc.d rspamd start || exit $?
fi