This file is indexed.

postinst is in memcached 1.4.14-0ubuntu9.3.

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
#!/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 \
              --no-create-home \
              --ingroup $GROUP \
              --home $DATADIR \
              --gecos "Memcached" \
              --shell /bin/false \
              $USER  >/dev/null
    fi

    # Remove leftover directory. Can be removed in 14.10. (LP: #1255328)
    if dpkg --compare-versions "$2" lt-nl "1.4.14-0ubuntu9" ; then
            rm -rf $DATADIR
    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" ] || [ -e "/etc/init/memcached.conf" ]; 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