diff options
author | Sven Moritz Hallberg <pesco@khjk.org> | 2009-03-12 20:33:28 +0100 |
---|---|---|
committer | Sven Moritz Hallberg <pesco@khjk.org> | 2009-03-12 20:33:28 +0100 |
commit | 673a54c5a78afd1dd41b4cd8811df5ab65042583 (patch) | |
tree | bffaa961139ac2be20f0875ef0ed37c87d6b18a9 /debian/bitlbee.init | |
parent | 823de9d44f262ea2364ac8ec6a1e18e0f7dab658 (diff) | |
parent | 9e768da723b4a770967efa0d4dcaf58ccef8917f (diff) |
pretty blind try at merging in the latest trunk
Diffstat (limited to 'debian/bitlbee.init')
-rwxr-xr-x | debian/bitlbee.init | 16 |
1 files changed, 12 insertions, 4 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 "." |