summaryrefslogtreecommitdiffstats
path: root/debian/postrm
blob: 333f2b5af0c07b8c9bd6998d628bb6f61faf717b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
set -e

if [ "$1" = "purge" ]; then
   update-rc.d rspamd remove >/dev/null
fi

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
fi

#DEBHELPER#

case "$1" in
    purge)
      rm -rf /var/lib/rspamd
      rm -rf /var/log/rspamd
      rm -rf /run/rspamd
      exit 0;;
    remove|upgrade|disappear|failed-upgrade|abort-*)
      exit 0;;
    *)
      echo "postrm called with unknown argument \`$1'" >&2
      exit 1;;
esac