Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/postinst

    r628e601 rd301872  
    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.