]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Restart rspamd on upgrade, stop on removal
authorMikhail Gusarov <dottedmag@debian.org>
Sat, 16 May 2015 19:28:57 +0000 (19:28 +0000)
committerMikhail Gusarov <dottedmag@debian.org>
Sat, 16 May 2015 23:51:00 +0000 (23:51 +0000)
debian/postinst
debian/postrm

index 6d725a90d373dd110f9e2b6504b053d4d59016df..8d96fcb18e74f3c1491aa2db04a58a12e749b62b 100644 (file)
@@ -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
index 0ab952d467e057929a343c3bfd83c6200908ae68..333f2b5af0c07b8c9bd6998d628bb6f61faf717b 100644 (file)
@@ -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#