This file is indexed.

postinst is in couchdb 1.5.0-0ubuntu1.

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
#!/bin/sh -e

# Copyright 2009, Noah Slater <nslater@tumbolia.org>

# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and this
# notice are preserved.

case $1 in
    configure)
        if ! getent passwd couchdb > /dev/null; then
            adduser --system --quiet \
                --home /var/lib/couchdb --no-create-home \
                --shell /bin/bash --group --gecos "CouchDB Administrator" couchdb
        fi
        if test "`id -u couchdb`" -eq 0; then
            echo "The couchdb administrative user must not be root." >&2
            false
        fi
        if test "`id -g couchdb`" -eq 0; then
            echo "The couchdb administrative group must not be root." >&2
            false
        fi
        # These should not be world readable:
        chmod 0640 /etc/couchdb/local.ini
        chmod 0750 /etc/couchdb/local.d
        chmod 0750 /var/lib/couchdb
        chmod 0750 /var/log/couchdb
        # And should be owned by the couchdb user and group:
        chown couchdb:couchdb /etc/couchdb/local.ini
        chown -R couchdb:couchdb /etc/couchdb/local.d
        chown -R couchdb:couchdb /var/lib/couchdb
        chown -R couchdb:couchdb /var/log/couchdb
        ;;
esac

# Automatically added by dh_installinit
if [ -x "/etc/init.d/couchdb" ] || [ -e "/etc/init/couchdb.conf" ]; then
	if [ ! -e "/etc/init/couchdb.conf" ]; then
		update-rc.d couchdb defaults >/dev/null
	fi
	invoke-rc.d couchdb start || exit $?
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f couchdb remove >/dev/null || exit $?
# End automatically added section