aboutsummaryrefslogtreecommitdiffstats
path: root/debian/prerm
blob: 8426ab3ab4cdde9a29eb3363c0fa72ac4a531ce4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh -e

if [ "$1" = "upgrade" ]; then
	## To prevent the help function from breaking in currently running
	## BitlBee processes. Have to do it like this because dpkg-reconfigure
	## looks a lot like an upgrade and we don't want to lose help.txt...
	if [ -e /usr/share/bitlbee/help.txt ]; then
		rm -f /usr/share/bitlbee/help.upgrading
		mv /usr/share/bitlbee/help.txt /usr/share/bitlbee/help.upgrading
	fi
else
	if which invoke-rc.d >/dev/null 2>&1; then
		invoke-rc.d bitblee stop || exit 0
	else
		/etc/init.d/bitlbee stop || exit 0
	fi
fi