postinst is in echolot 2.1.9-1.
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 | #!/bin/sh -e
# postinst for Echolot
# remove old debconf stuff
if [ "$1" = "configure" ] && [ -e /usr/share/debconf/confmodule ]; then
if dpkg --compare-versions "$2" lt "2.1.7" ; then
. /usr/share/debconf/confmodule
db_purge
db_stop
fi
fi
if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt "2.1.8-7"; then
if ( dpkg-statoverride --list /var/run/echolot > /dev/null ); then
dpkg-statoverride --remove /var/run/echolot
fi
fi
# Make sure the echolot user exists
adduser --quiet \
--quiet \
--system \
--disabled-password \
--shell /bin/bash \
--home /var/lib/echolot \
--no-create-home \
--group \
--gecos "Echolot Pinger" \
echolot
# Give the echolot user write permissions to /var/log/echolot/echolot.log
touch /var/log/echolot/echolot.log
chown echolot:adm /var/log/echolot/echolot.log
chmod 640 /var/log/echolot/echolot.log
# and /var/lib/echolot
if ( ! dpkg-statoverride --list /var/lib/echolot > /dev/null ); then
dpkg-statoverride --update --add root echolot 02775 /var/lib/echolot
fi
# Automatically added by dh_installinit
if [ -x "/etc/init.d/echolot" ]; then
update-rc.d echolot defaults >/dev/null
fi
if [ -x "/etc/init.d/echolot" ] || [ -e "/etc/init/echolot.conf" ]; then
invoke-rc.d echolot start || exit $?
fi
# End automatically added section
# vim:set ts=4:
# vim:set shiftwidth=4:
|