aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdebian/bitlbee.init16
-rw-r--r--debian/changelog9
-rwxr-xr-xdebian/postinst2
3 files changed, 22 insertions, 5 deletions
diff --git a/debian/bitlbee.init b/debian/bitlbee.init
index f8fac49c..1ab1bc43 100755
--- a/debian/bitlbee.init
+++ b/debian/bitlbee.init
@@ -31,8 +31,6 @@ if [ -r /etc/default/$NAME ]; then
. /etc/default/$NAME
fi
-[ "$BITLBEE_DISABLED" = "1" ] && exit 0
-
#
# Function that starts the daemon/service.
@@ -40,9 +38,17 @@ fi
d_start() {
# Make sure BitlBee can actually write its PID...
touch /var/run/bitlbee.pid
- chown bitlbee /var/run/bitlbee.pid
+ chown bitlbee: /var/run/bitlbee.pid
- start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ # Clean up after the bug between 1.2-5 and 1.2.1-2 where BitlBee ran
+ # as root. (#494656 and #495877) Fixing this in the postinst script
+ # is not enough since the user will restart his BitlBee after up-
+ # grading the package, and the BitlBee running as root will then
+ # save its settings, re-setting ownership of the file to root.
+ # TODO: Remove this after a few revisions.
+ find /var/lib/bitlbee -uid 0 -name '*.xml' -exec chown bitlbee: {} \;
+
+ start-stop-daemon --start --quiet \
--exec $DAEMON -- -p $BITLBEE_PORT -P $PIDFILE $BITLBEE_OPTS
}
@@ -57,6 +63,8 @@ d_stop() {
case "$1" in
start)
+ [ "$BITLBEE_DISABLED" = "1" ] && exit 0
+
echo -n "Starting $DESC: $NAME"
d_start
echo "."
diff --git a/debian/changelog b/debian/changelog
index f1e25040..1745e6c4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+bitlbee (1.2.1-3) unstable; urgency=high
+
+ * chown /var/lib/bitlbee/*.xml to bitlbee:bitlbee to clean up after
+ 1.2-5 and the bugfix in 1.2.1-2. (Closes: #495877)
+ * Moved BITLBEE_DISABLED check to only check when trying to *start*
+ the daemon. (Closes: #488611)
+
+ -- Wilmer van der Gaast <wilmer@gaast.net> Sat, 23 Aug 2008 18:53:54 +0100
+
bitlbee (1.2.1-2) unstable; urgency=low
* Properly set the User= line to something sensible so BitlBee won't
diff --git a/debian/postinst b/debian/postinst
index 4f5711ba..db324b65 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -79,7 +79,7 @@ if [ -n "$2" -a "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then
fi
## If we're upgrading, we'll probably skip this next part
-if [ -d $CONFDIR ] && chown -R bitlbee $CONFDIR; then
+if [ -d $CONFDIR ] && chown -R bitlbee: $CONFDIR; then
echo 'BitlBee (probably) already installed, skipping user/configdir installation'
exit 0
fi