Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/postinst

    r628e601 r7448e1b  
    1414BITLBEE_DISABLED=0
    1515BITLBEE_UPGRADE_DONT_RESTART=0
    16 [ -r /etc/default/bitlbee ] && . /etc/default/bitlbee
     16[ -r /etc/default/bitlbee ] && source /etc/default/bitlbee
    1717
    18 if [ "$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.
     18if [ "$BITLBEE_DISABLED" = "0" ]; then
     19        ## In case it's still there (if we're upgrading right now)
    2220        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
    3021fi
    3122
     
    7465fi
    7566
    76 adduser --system --group --disabled-login --disabled-password --home /var/lib/bitlbee/ bitlbee
     67adduser --system --home /var/lib/bitlbee/ --disabled-login --disabled-password bitlbee
    7768chmod 700 /var/lib/bitlbee/
    7869
    7970## Can't do this in packaging phase: Don't know the UID yet. Access to
    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.
    84 if getent group bitlbee > /dev/null; then
    85         chmod 640 /etc/bitlbee/bitlbee.conf
    86         chown root:bitlbee /etc/bitlbee/bitlbee.conf
    87 else
    88         chmod 600 /etc/bitlbee/bitlbee.conf
    89         chown bitlbee /etc/bitlbee/bitlbee.conf
    90 fi
     71## the file should be limited, now that it stores passwords.
     72chmod 600 /etc/bitlbee/bitlbee.conf
     73chown bitlbee /etc/bitlbee/bitlbee.conf
    9174
    9275if [ -z "$2" ]; then
Note: See TracChangeset for help on using the changeset viewer.