postinst is in drizzle 1:7.2.3-2ubuntu2.
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 | #!/bin/sh
#
# summary of how this script can be called:
DATADIR=/var/lib/drizzle
LOGDIR=/var/log/drizzle
set -e
# allow debconf to load the template file for the purge-database question.
. /usr/share/debconf/confmodule
# creating drizzle group if it isn't already there
if ! getent group drizzle >/dev/null; then
# Adding system group: drizzle.
addgroup --system drizzle >/dev/null
fi
# creating drizzle user if it isn't already there
if ! getent passwd drizzle >/dev/null; then
# Adding system user: drizzle.
adduser \
--system \
--disabled-login \
--ingroup drizzle \
--home $DATADIR \
--gecos "Drizzle Server" \
--shell /bin/false \
drizzle >/dev/null
fi
# mkdir logdir
if [ ! -d $LOGDIR ]; then
mkdir $LOGDIR
chown drizzle:drizzle $LOGDIR
fi
# ensure that this dir is owned by the drizzle user.
# but change it only if it was root before (as it is installed as root from the
# deb.)
DATADIR_OWNER=$(stat -c "%U" $DATADIR)
if [ "$DATADIR_OWNER" = "root" ]; then
chown drizzle:drizzle $DATADIR
fi
# Automatically added by dh_installinit
if [ -x "/etc/init.d/drizzle" ] || [ -e "/etc/init/drizzle.conf" ]; then
if [ ! -e "/etc/init/drizzle.conf" ]; then
update-rc.d drizzle defaults >/dev/null
fi
invoke-rc.d drizzle start || exit $?
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f drizzle remove >/dev/null || exit $?
# End automatically added section
db_stop
exit 0
|