This file is indexed.

postinst is in debci 1.7.1.

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

set -e

. /usr/share/debconf/confmodule

setup_system() {
    if [ ! -d /var/lib/debci ]; then
        mkdir /var/lib/debci
    fi

    if [ ! -d /var/lib/debci/data ]; then
        mkdir /var/lib/debci/data
    fi

    chgrp debci /var/lib/debci/data 2>/dev/null ||
        {
            addgroup --system debci
            chgrp debci /var/lib/debci/data
        }
    chown debci /var/lib/debci/data 2>/dev/null ||
        {
            adduser --system --home /usr/share/debci --shell /bin/sh --no-create-home --disabled-password --ingroup debci debci
            chown debci /var/lib/debci/data
        }

    if [ ! -d /var/lib/debci/chroots ]; then
        mkdir /var/lib/debci/chroots
    fi

    if [ ! -d /var/log/debci ]; then
        mkdir /var/log/debci
        chown debci:debci /var/log/debci
    fi
}

migrate_data() {
    su --login --command '/usr/bin/debci migrate' debci
}

case "$1" in
    configure)
        setup_system
        migrate_data
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

db_stop



exit 0