postinst is in ippl 1.4.14-12.2build1.
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 | #!/bin/bash -e
# postinst
USERNAME="Debian-ippl"
# purge debconf database entries on upgrade from 1.4.14-4 and 1.4.14-5
[ -n "$IPPLDEBUG" ] && set -x
if [ "$1" = "configure" ]; then
if dpkg --compare-versions "$2" le-nl "1.4.14-4" || \
dpkg --compare-versions "$2" le-nl "1.4.14-5"; then
if [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
db_stop
fi
fi
fi
# Add user
if [ "$1" = "configure" ]; then
echo >&2 'Adding system user'
adduser --system --group --home /var/run/ippl \
--disabled-login --force-badname $USERNAME
fi
# Automatically added by dh_installinit/11.1.6ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -x "/etc/init.d/ippl" ]; then
update-rc.d ippl defaults >/dev/null
invoke-rc.d ippl start || exit 1
fi
fi
# End automatically added section
# zap old run files. Starting with 1.4.14-6, we are in /var/run/ippl/
rm -f /var/run/ippl.conf /var/run/ippl.pid
|