aboutsummaryrefslogtreecommitdiffstats
path: root/debian/prerm
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@debian.org>2015-03-07 10:23:13 +0000
committerAndrew Lewis <nerf@judo.za.org>2015-03-17 18:58:34 +0200
commite10ddbdaefe0c74875648bf182e000d0b5e42a82 (patch)
treecdf71839278ddcbc8c75454e11d6d39d2378aff4 /debian/prerm
parentaf765c345234e920a4c45ba24af156a029304ab9 (diff)
downloadrspamd-e10ddbdaefe0c74875648bf182e000d0b5e42a82.tar.gz
rspamd-e10ddbdaefe0c74875648bf182e000d0b5e42a82.zip
Work around Debian mishandling of systemd socket-activated units
If there is a backward compatibility sysvinit script, then even socket-activated services are started automatically after install/upgrade.
Diffstat (limited to 'debian/prerm')
-rw-r--r--debian/prerm8
1 files changed, 8 insertions, 0 deletions
diff --git a/debian/prerm b/debian/prerm
new file mode 100644
index 000000000..94172155b
--- /dev/null
+++ b/debian/prerm
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+if [ -x /etc/init.d/rspamd ] && ! [ -d /run/systemd/system ]; then
+ invoke-rc.d rspamd stop || exit $?
+fi
+
+#DEBHELPER#