postinst is in tryton-server 2.2.1-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 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 | #!/bin/sh
set -e
TRYTON_USER="tryton"
TRYTON_CONFFILE="/etc/trytond.conf"
TRYTON_LOGDIR="/var/log/tryton"
TRYTON_HOMEDIR="/var/lib/tryton"
case "${1}" in
configure)
# Creating system user
adduser --home ${TRYTON_HOMEDIR} --no-create-home --quiet --system --group ${TRYTON_USER}
# Creating home directory (also used for storage of attachments)
mkdir -p ${TRYTON_HOMEDIR}
chown ${TRYTON_USER}:${TRYTON_USER} ${TRYTON_HOMEDIR}
chmod 0750 ${TRYTON_HOMEDIR}
# Creating log directory
mkdir -p ${TRYTON_LOGDIR}
chown ${TRYTON_USER}:adm ${TRYTON_LOGDIR}
chmod 0750 ${TRYTON_LOGDIR}
# Setting ownership and permissions on configuration file
# trytond uses internal defaults, if it cannot read the
# configuration file.
chown ${TRYTON_USER}:${TRYTON_USER} ${TRYTON_CONFFILE}
chmod 0400 ${TRYTON_CONFFILE}
echo
echo "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"
echo "* Tryton Setup: *"
echo "* Tryton uses a database (RDBMS), preferably PostgreSQL to store its *"
echo "* data. You have to setup this database manually. *"
echo "* Please read /usr/share/doc/tryton-server/README.Debian how to do it. *"
echo "* *"
echo "* Note: If you intend to use solely Neso, the standalone application *"
echo "* of Tryton, no database setup is required. *"
echo "* *"
echo "* Tryton Upgrade: *"
echo "* On upgrades of major versions (i.e. second number of version string) *"
echo "* you have also to run a database update on existing databases. *"
echo "* Please read /usr/share/doc/tryton-server/README.Debian how to do it. *"
echo "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"
echo
;;
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/tryton-server" ]; then
if [ ! -e "/etc/init/tryton-server.conf" ]; then
update-rc.d tryton-server defaults 21 >/dev/null
fi
invoke-rc.d tryton-server start || exit $?
fi
# End automatically added section
# Automatically added by dh_python2:
if which pycompile >/dev/null 2>&1; then
pycompile -p tryton-server
fi
# End automatically added section
exit 0
|