Changeset 934dddf3 for debian/postinst


Ignore:
Timestamp:
2008-08-24T16:51:01Z (16 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
7125cb3
Parents:
88d2208 (diff), d301872 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging Debian package tree.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/postinst

    r88d2208 r934dddf3  
    6464fi
    6565
     66if ! grep -qi '^User *= *' /etc/bitlbee/bitlbee.conf; then
     67        echo 'Updating configuration file, enabling User-setting...'
     68        if ! sed -i -e 's/# *User *= *.*/User = bitlbee/i' /etc/bitlbee/bitlbee.conf; then
     69                echo 'Failed! BitlBee may run as root now, please check your configs.'
     70        fi
     71fi
     72
    6673if [ -n "$2" -a "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then
    67         /etc/init.d/bitlbee restart
     74        if which invoke-rc.d >/dev/null 2>&1; then
     75                invoke-rc.d bitlbee restart
     76        else
     77                /etc/init.d/bitlbee restart
     78        fi
    6879fi
    6980
    7081## If we're upgrading, we'll probably skip this next part
    71 if [ -d $CONFDIR ] && chown -R bitlbee $CONFDIR; then
     82if [ -d $CONFDIR ] && chown -R bitlbee: $CONFDIR; then
    7283        echo 'BitlBee (probably) already installed, skipping user/configdir installation'
    7384        exit 0
     
    91102
    92103if [ -z "$2" ]; then
    93         /etc/init.d/bitlbee start
     104        if which invoke-rc.d >/dev/null 2>&1; then
     105                invoke-rc.d bitlbee start
     106        else
     107                /etc/init.d/bitlbee start
     108        fi
    94109fi
Note: See TracChangeset for help on using the changeset viewer.