postinst is in bitlbee-common 3.5.1-1build1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | #!/bin/sh
set -e
CONFDIR=/var/lib/bitlbee/
if [ -e /etc/default/bitlbee ]; then
cat <<EOF >/etc/default/bitlbee
## /etc/default/bitlbee: Auto-generated/updated script.
##
## This file is deprecated and no longer used.
## Please edit /etc/bitlbee/bitlbee.conf instead
EOF
fi
## Restore the helpfile in case we weren't upgrading but just reconfiguring:
if [ -e /usr/share/bitlbee/help.upgrading ]; then
if [ -e /usr/share/bitlbee/help.txt ]; then
rm -f /usr/share/bitlbee/help.upgrading
else
mv /usr/share/bitlbee/help.upgrading /usr/share/bitlbee/help.txt
fi
fi
if [ -n "$2" -a -x "/etc/init.d/bitlbee" ]; then
invoke-rc.d bitlbee restart
fi
## If we're upgrading, we'll probably skip this next part
if [ -d $CONFDIR ] && chown -R bitlbee: $CONFDIR; then
echo 'BitlBee (probably) already installed, skipping user/configdir installation'
else
adduser --system --group --disabled-login --disabled-password --home /var/lib/bitlbee/ bitlbee
fi
chmod 700 /var/lib/bitlbee/
## Can't do this in packaging phase: Don't know the UID yet. Access to
## the file should be limited, now that it stores passwords. Added
## --group later for a little more security, but have to see if I can
## apply this change to existing installations on upgrades. Will think
## about that later.
if getent group bitlbee > /dev/null; then
chmod 640 /etc/bitlbee/bitlbee.conf
chown root:bitlbee /etc/bitlbee/bitlbee.conf
else
chmod 600 /etc/bitlbee/bitlbee.conf
chown bitlbee /etc/bitlbee/bitlbee.conf
fi
# Automatically added by dh_systemd_enable/10.6.4ubuntu1
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask bitlbee.service >/dev/null || true
# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled bitlbee.service; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable bitlbee.service >/dev/null || true
else
# Update the statefile to add new symlinks (if any), which need to be
# cleaned up on purge. Also remove old symlinks.
deb-systemd-helper update-state bitlbee.service >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_systemd_enable/10.6.4ubuntu1
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask bitlbee.socket >/dev/null || true
# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled bitlbee.socket; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable bitlbee.socket >/dev/null || true
else
# Update the statefile to add new symlinks (if any), which need to be
# cleaned up on purge. Also remove old symlinks.
deb-systemd-helper update-state bitlbee.socket >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installinit/10.6.4ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
if [ -x "/etc/init.d/bitlbee" ]; then
update-rc.d bitlbee defaults >/dev/null
invoke-rc.d bitlbee start || exit $?
fi
fi
# End automatically added section
|