aboutsummaryrefslogtreecommitdiffstats
path: root/debian/bitlbee-common.postinst
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2014-10-05 23:02:56 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2014-10-05 23:02:56 +0100
commitc180110d9108f7d16aeac58aafea5114074ba39b (patch)
treedf39e889390356d9efef8700eea7d64c964cc55c /debian/bitlbee-common.postinst
parent3a8b8501028b7910ac1d2cfef76f2c72d81dc6e1 (diff)
3.2.2-1. Minor change, removed very old compatibility kludge.3.2.2-1
Diffstat (limited to 'debian/bitlbee-common.postinst')
-rw-r--r--debian/bitlbee-common.postinst17
1 files changed, 2 insertions, 15 deletions
diff --git a/debian/bitlbee-common.postinst b/debian/bitlbee-common.postinst
index 3225a02a..4587ce7a 100644
--- a/debian/bitlbee-common.postinst
+++ b/debian/bitlbee-common.postinst
@@ -65,21 +65,8 @@ if [ -e /usr/share/bitlbee/help.upgrading ]; then
fi
fi
-# The official way to check if we're upgrading is to check if $2 is
-# non-empty. However, previous versions of BitlBee didn't have a
-# bitlbee-common package so in that case the var will also be empty.
-# Instead, check if the port is in use (if netstat is available). This
-# works since the debconf code will pick a free port on new installs.
-if [ "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then
- unset IS_UPGRADE
- if which netstat > /dev/null 2> /dev/null; then
- netstat -an | grep -q :$PORT\\b.*LISTEN && IS_UPGRADE=1
- else
- [ -n "$2" ] && IS_UPGRADE=1
- fi
- if [ -n "$IS_UPGRADE" ]; then
- invoke-rc.d bitlbee restart
- fi
+if [ "$BITLBEE_UPGRADE_DONT_RESTART" != "1" -a -n "$2" ]; then
+ invoke-rc.d bitlbee restart
fi
## If we're upgrading, we'll probably skip this next part