postinst is in zope-common 0.5.52.
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 | #! /bin/sh
# postinst script for zope-common
set -e
zopeuser=zope
zopegroup=$zopeuser
. /usr/share/debconf/confmodule
case "$1" in
configure)
if ! getent group zope > /dev/null 2>&1 ; then
addgroup --system --quiet $zopegroup
fi
if ! getent passwd zope > /dev/null 2>&1 ; then
adduser --quiet \
--system --disabled-login --ingroup $zopegroup \
--home /var/lib/zope --no-create-home \
$zopeuser
fi
if [ ! -d /var/lib/zope/dzhandle ]; then
mkdir -p /var/lib/zope/dzhandle
chown $zopeuse:$zopegroup /var/lib/zope/dzhandle
fi
LOCALDIR=/usr/local/share/zope
if [ ! -d $LOCALDIR ]; then
if mkdir $LOCALDIR 2>/dev/null ; then
mkdir $LOCALDIR/Products
mkdir $LOCALDIR/Extensions
chmod 2775 $LOCALDIR -R
chown root:$zopegroup $LOCALDIR -R
fi
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0
|