This file is indexed.

postinst is in maas-common 2.0.0~beta3+bzr4941-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
#!/bin/sh

set -e

configure_logging() {
    # Logging directory (/var/log/maas)
    chown maas:maas /var/log/maas/

    if [ ! -f /var/log/maas/maas.log ]; then
        touch /var/log/maas/maas.log
    fi
    chown syslog:syslog /var/log/maas/maas.log
}

configure_lib_dir() {
    # Ensure lib dir has correct permissions
    chown maas:maas /var/lib/maas/

    if [ -d /var/lib/maas/gnupg ]; then
        chown -R maas:maas /var/lib/maas/gnupg
    fi
}

add_user_group(){
    local user="maas"
    local group="maas"
    local home="/var/lib/maas"
    addgroup --quiet --system "$group" || true
    adduser --quiet --system --group --home "$home" "$user" || true
}

ln -sf /usr/share/maas/maas-rsyslog.conf /etc/rsyslog.d/99-maas.conf

add_user_group
configure_logging
configure_lib_dir