This file is indexed.

postinst is in pinto 0.97+dfsg-2.

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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/sh

set -e

. /usr/share/debconf/confmodule

defaultRepositoryPath='/var/lib/pinto/repository/default'

if [ "$1" = configure ]; then
    getent group pinto >/dev/null 2>&1 || addgroup --system pinto
    getent passwd pinto >/dev/null 2>&1 ||
    adduser \
        --system \
        --home /var/lib/pinto \
        --disabled-password \
        --ingroup pinto \
        pinto

    if [ ! -e "$defaultRepositoryPath" ] ; then
        pinto -r $defaultRepositoryPath init
        chown -R pinto:pinto $defaultRepositoryPath
    else
        echo "Cannot create a new repository to $defaultRepositoryPath."
        echo "$defaultRepositoryPath already exist."
        echo "To create a new repository, remove $defaultRepositoryPath."
        echo "and exec /usr/bin/pinto -r $defaultRepositoryPath init."
    fi

    if [ ! -d /var/log/pinto ] ; then
        mkdir -p /var/log/pinto
        chown pinto:adm /var/log/pinto
        chmod 0750 /var/log/pinto
    fi

    if [ ! -e /var/log/pinto/access.log ] ; then
        touch /var/log/pinto/access.log
        chown pinto:adm /var/log/pinto/access.log
        chmod 0640 /var/log/pinto/access.log
    fi

    if [ ! -e /var/log/pinto/error.log ] ; then
        touch /var/log/pinto/error.log
        chown pinto:adm /var/log/pinto/error.log
        chmod 0640 /var/log/pinto/error.log
    fi

    if [ ! -d /etc/pinto ] ; then
        mkdir -p /etc/pinto
        chown pinto:pinto /etc/pinto
        chmod 0700 /etc/pinto
    fi

    db_get pinto/adminpassword
    admpass="$RET"
    htpw='/etc/pinto/htpasswd.users'

    if [ -n "$admpass" ]; then
        touch "$htpw"
        echo "$admpass"|htpasswd -i "$htpw" pintoadmin
        chown pinto:pinto "$htpw"
        chmod 0400 "$htpw"
    fi

    db_set pinto/adminpassword ""
    db_set pinto/adminpassword-repeat ""
fi

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


db_stop

exit 0