Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/postinst

    r7448e1b r628e601  
    1414BITLBEE_DISABLED=0
    1515BITLBEE_UPGRADE_DONT_RESTART=0
    16 [ -r /etc/default/bitlbee ] && source /etc/default/bitlbee
     16[ -r /etc/default/bitlbee ] && . /etc/default/bitlbee
    1717
    18 if [ "$BITLBEE_DISABLED" = "0" ]; then
    19         ## In case it's still there (if we're upgrading right now)
     18if [ "$BITLBEE_DISABLED" = "0" ] && type update-inetd > /dev/null 2> /dev/null &&
     19   ( expr "$2" : '0\..*' > /dev/null || expr "$2" : '1\.0\..*' > /dev/null ); then
     20        ## Make sure the inetd entry is gone (can still be there from a
     21        ## previous version.
    2022        update-inetd --remove '.*/usr/sbin/bitlbee'
     23        if grep -q /usr/sbin/bitlbee /etc/inetd.conf 2> /dev/null; then
     24                # Thanks for breaking update-inetd! (bugs.debian.org/311111)
     25                # I hope that it works at least with xinetd, because this
     26                # emergency hack doesn't:
     27                perl -pi -e 's:^[^#].*/usr/sbin/bitlbee$:## Now using daemon mode\: # $&:' /etc/inetd.conf
     28                killall -HUP inetd || true
     29        fi
    2130fi
    2231
     
    6574fi
    6675
    67 adduser --system --home /var/lib/bitlbee/ --disabled-login --disabled-password bitlbee
     76adduser --system --group --disabled-login --disabled-password --home /var/lib/bitlbee/ bitlbee
    6877chmod 700 /var/lib/bitlbee/
    6978
    7079## Can't do this in packaging phase: Don't know the UID yet. Access to
    71 ## the file should be limited, now that it stores passwords.
    72 chmod 600 /etc/bitlbee/bitlbee.conf
    73 chown bitlbee /etc/bitlbee/bitlbee.conf
     80## the file should be limited, now that it stores passwords. Added
     81## --group later for a little more security, but have to see if I can
     82## apply this change to existing installations on upgrades. Will think
     83## about that later.
     84if getent group bitlbee > /dev/null; then
     85        chmod 640 /etc/bitlbee/bitlbee.conf
     86        chown root:bitlbee /etc/bitlbee/bitlbee.conf
     87else
     88        chmod 600 /etc/bitlbee/bitlbee.conf
     89        chown bitlbee /etc/bitlbee/bitlbee.conf
     90fi
    7491
    7592if [ -z "$2" ]; then
Note: See TracChangeset for help on using the changeset viewer.