aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdebian/postinst9
-rwxr-xr-xdebian/prerm9
2 files changed, 16 insertions, 2 deletions
diff --git a/debian/postinst b/debian/postinst
index 6c99c40d..37608e47 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -45,6 +45,15 @@ EOF
## Bye-bye DebConf, we don't need you anymore.
db_stop
+## Restore the helpfile in case we weren't upgrading but just reconfiguring:
+if [ -e /usr/share/bitlbee/help.upgrading ]; then
+ if [ -e /usr/share/bitlbee/help.txt ]; then
+ rm -f /usr/share/bitlbee/help.upgrading
+ else
+ mv /usr/share/bitlbee/help.upgrading /usr/share/bitlbee/help.txt
+ fi
+fi
+
if [ -n "$2" -a "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then
/etc/init.d/bitlbee restart
fi
diff --git a/debian/prerm b/debian/prerm
index c02b13f4..5272e273 100755
--- a/debian/prerm
+++ b/debian/prerm
@@ -1,8 +1,13 @@
#!/bin/sh -e
if [ "$1" = "upgrade" ]; then
- ## To prevent the help function from breaking in currently running BitlBee processes
- rm -f /usr/share/bitlbee/help.txt
+ ## 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
/etc/init.d/bitlbee stop || exit 0
fi