postinst is in pymsnt 0.11.3-5.
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 | #!/bin/sh
set -e
case "$1" in
configure)
adduser --system --disabled-login \
--no-create-home --home /var/lib/pymsnt \
--group \
pymsnt
if ! dpkg-statoverride --list /var/lib/pymsnt >/dev/null; then
chown -R pymsnt:pymsnt /var/lib/pymsnt
fi
if test -n "$2" && dpkg --compare-versions "$2" le 0.11.1-4; then
if test -f /var/log/jabber/pymsnt.log*; then
mv /var/log/jabber/pymsnt.log* /var/log/pymsnt
fi
fi
if ! dpkg-statoverride --list /var/log/pymsnt >/dev/null; then
chown -R pymsnt:adm /var/log/pymsnt
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# Automatically added by dh_installinit
if [ -x "/etc/init.d/pymsnt" ]; then
update-rc.d pymsnt defaults >/dev/null
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d pymsnt start || exit $?
else
/etc/init.d/pymsnt start || exit $?
fi
fi
# End automatically added section
# Automatically added by dh_pycentral
rm -f /var/lib/pycentral/pymsnt.pkgremove
if which pycentral >/dev/null 2>&1; then
pycentral pkginstall pymsnt
if grep -qs '^pymsnt$' /var/lib/pycentral/delayed-pkgs; then
sed -i '/^pymsnt$/d' /var/lib/pycentral/delayed-pkgs
fi
fi
# End automatically added section
exit 0
|