postinst is in memcached 1.4.13-0ubuntu2.
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 | #!/bin/sh
set -e
GROUP="memcache"
USER="memcache"
DATADIR="/nonexistent"
# shamelessly copied from debian gearman-job-server package...
case "$1" in
configure)
# creating memcache group if it isn't already there
if ! getent group $GROUP >/dev/null ; then
# Adding system group
addgroup --system $GROUP >/dev/null
fi
# creating memcache user if it isn't already there
if ! getent passwd $USER >/dev/null ; then
# Adding system user
adduser \
--system \
--disabled-login \
--ingroup $GROUP \
--home $DATADIR \
--gecos "Memcached" \
--shell /bin/false \
$USER >/dev/null
fi
if [ ! -e /etc/memcached.conf ]
then
mkdir -p /etc
cp /usr/share/memcached/memcached.conf.default /etc/memcached.conf
fi
;;
esac
# Automatically added by dh_installinit
if [ -x "/etc/init.d/memcached" ]; then
if [ ! -e "/etc/init/memcached.conf" ]; then
update-rc.d memcached defaults >/dev/null
fi
invoke-rc.d memcached start || exit $?
fi
# End automatically added section
|