postinst is in cyphesis-cpp 0.6.0-3ubuntu2.
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 | #!/bin/sh
set -e
. /usr/share/debconf/confmodule
if [ "$1" = configure ] ;
then
# Add user cyphesis as system user
adduser --system --quiet --no-create-home --home /usr/share/games/cyphesis --gecos "Cyphesis C++ Administrator" --force-badname Cyphesis
# Get the return values
db_get cyphesis-cpp/autostart
AUTOSTART=$RET
# This is a little ugly but otherwise lintian complains
update-rc.d cyphesis-cpp defaults >/dev/null
if [ "x$AUTOSTART" != xtrue ] ; then
update_rc="disable"
invoke_rc="stop"
else
update_rc="enable"
invoke_rc="start"
fi
# Clear password from debconf database
db_reset cyphesis-cpp/postgresql/password
update-rc.d cyphesis-cpp $update_rc >/dev/null
invoke-rc.d cyphesis-cpp $invoke_rc || exit $?
fi
db_stop
|