Changes in debian/postinst [628e601:7448e1b]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
debian/postinst
r628e601 r7448e1b 14 14 BITLBEE_DISABLED=0 15 15 BITLBEE_UPGRADE_DONT_RESTART=0 16 [ -r /etc/default/bitlbee ] && ./etc/default/bitlbee16 [ -r /etc/default/bitlbee ] && source /etc/default/bitlbee 17 17 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. 18 if [ "$BITLBEE_DISABLED" = "0" ]; then 19 ## In case it's still there (if we're upgrading right now) 22 20 update-inetd --remove '.*/usr/sbin/bitlbee' 23 if grep -q /usr/sbin/bitlbee /etc/inetd.conf 2> /dev/null; then24 # Thanks for breaking update-inetd! (bugs.debian.org/311111)25 # I hope that it works at least with xinetd, because this26 # emergency hack doesn't:27 perl -pi -e 's:^[^#].*/usr/sbin/bitlbee$:## Now using daemon mode\: # $&:' /etc/inetd.conf28 killall -HUP inetd || true29 fi30 21 fi 31 22 … … 74 65 fi 75 66 76 adduser --system -- group --disabled-login --disabled-password --home /var/lib/bitlbee/bitlbee67 adduser --system --home /var/lib/bitlbee/ --disabled-login --disabled-password bitlbee 77 68 chmod 700 /var/lib/bitlbee/ 78 69 79 70 ## 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. 72 chmod 600 /etc/bitlbee/bitlbee.conf 73 chown bitlbee /etc/bitlbee/bitlbee.conf 91 74 92 75 if [ -z "$2" ]; then
Note: See TracChangeset
for help on using the changeset viewer.