aboutsummaryrefslogtreecommitdiffstats
path: root/debian/postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/postinst')
-rwxr-xr-xdebian/postinst9
1 files changed, 8 insertions, 1 deletions
diff --git a/debian/postinst b/debian/postinst
index 37608e47..c4edb8e8 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -15,9 +15,16 @@ BITLBEE_DISABLED=0
BITLBEE_UPGRADE_DONT_RESTART=0
[ -r /etc/default/bitlbee ] && source /etc/default/bitlbee
-if [ "$BITLBEE_DISABLED" = "0" ]; then
+if [ "$BITLBEE_DISABLED" = "0" ] && expr "$2" : '0\..*' > /dev/null || expr "$2" : '1\.0\..*' > /dev/null; then
## In case it's still there (if we're upgrading right now)
update-inetd --remove '.*/usr/sbin/bitlbee'
+ if grep -q /usr/sbin/bitlbee /etc/inetd.conf 2> /dev/null; then
+ # Thanks for breaking update-inetd! (bugs.debian.org/311111)
+ # I hope that it works at least with xinetd, because this
+ # emergency hack doesn't:
+ perl -pi -e 's:^[^#].*/usr/sbin/bitlbee$:## Now using daemon mode\: # $&:' /etc/inetd.conf
+ killall -HUP inetd
+ fi
fi
cat<<EOF>/etc/default/bitlbee