reaction/DEBIAN/postrm
2023-12-20 15:56:39 +01:00

41 lines
1.0 KiB
Bash
Executable File

#! /bin/sh
# postrm script for reaction
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
# for details, see /usr/doc/packaging-manual/
case "$1" in
purge|disappear)
# Remove configuration
rm -f /etc/reaction.yml
# Remove database
rm -f /var/lib/reaction/*
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade)
# nothing
;;
esac
if [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
systemctl --system daemon-reload >/dev/null || true
fi
if [ "$1" = "purge" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper purge 'reaction.service' >/dev/null || true
fi
fi