Changes in debian/postinst [7448e1b:628e601]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
debian/postinst
r7448e1b r628e601 14 14 BITLBEE_DISABLED=0 15 15 BITLBEE_UPGRADE_DONT_RESTART=0 16 [ -r /etc/default/bitlbee ] && source/etc/default/bitlbee16 [ -r /etc/default/bitlbee ] && . /etc/default/bitlbee 17 17 18 if [ "$BITLBEE_DISABLED" = "0" ]; then 19 ## In case it's still there (if we're upgrading right now) 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. 20 22 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 21 30 fi 22 31 … … 65 74 fi 66 75 67 adduser --system -- home /var/lib/bitlbee/ --disabled-login --disabled-passwordbitlbee76 adduser --system --group --disabled-login --disabled-password --home /var/lib/bitlbee/ bitlbee 68 77 chmod 700 /var/lib/bitlbee/ 69 78 70 79 ## 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. 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 74 91 75 92 if [ -z "$2" ]; then
Note: See TracChangeset
for help on using the changeset viewer.