From: Mikhail Gusarov Date: Sat, 16 May 2015 19:28:57 +0000 (+0000) Subject: Restart rspamd on upgrade, stop on removal X-Git-Tag: 0.9.1~4^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9cc9d2ffba1170388d3d34846cee0623741761c;p=thirdparty%2Frspamd.git Restart rspamd on upgrade, stop on removal --- diff --git a/debian/postinst b/debian/postinst index 6d725a90d3..8d96fcb18e 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 diff --git a/debian/postrm b/debian/postrm index 0ab952d467..333f2b5af0 100644 --- a/debian/postrm +++ b/debian/postrm @@ -6,7 +6,8 @@ if [ "$1" = "purge" ]; then fi if [ -d /run/systemd/system ]; then - systemctl --system daemon-reload >/dev/null || true + deb-systemd-invoke --system daemon-reload >/dev/null || true + deb-systemd-invoke --system stop rspamd.service 2>/dev/null || true fi #DEBHELPER#