This file is indexed.

postinst is in freedombox-setup 0.12.

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

set -e

# Avoid etckeeper problem (refuses to commit) because git picked a
# email address with an empty mail domain.
if which etckeeper > /dev/null 2>&1 && \
    [ ! -e /etc/mailname ] &&
    [ "${HOME}" ] &&
    [ -z "$(git config --global --get user.email)" ] ; then
    git config --global user.email "root@localhost"
fi


# Migrate flag file to new inverted logic when upgrading
if dpkg --compare-versions "$2" le "0.0.23" &&
    [ -e /var/freedombox/first-run ] ; then
    rm /var/lib/freedombox/first-run-enable
    rm /var/freedombox/first-run
    rmdir /var/freedombox
fi

# Enable php7.0 Apache module when upgrading from olders version to
# 0.9.1 or above
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
    . /usr/share/apache2/apache2-maintscript-helper

    if dpkg --compare-versions "$2" le-nl "0.9" ; then
        if apache2_has_module php5 ; then
            # XXX: Hack around maintainer script refusing to disable a
            # module during configure
            method="$APACHE2_MAINTSCRIPT_METHOD"
            APACHE2_MAINTSCRIPT_METHOD="remove"
            apache2_invoke dismod php5
            APACHE2_MAINTSCRIPT_METHOD="$method"

            apache2_invoke enmod php7.0
        fi
    fi
fi

# Setup motd
if [ "$1" = "configure" ] && [ -f /etc/motd ] && [ ! -L /etc/motd ] ; then
    mkdir -p /etc/update-motd.d
    echo '#!/bin/sh' > /etc/update-motd.d/80-motd
    echo 'cat <<"EOF"' >> /etc/update-motd.d/80-motd
    cat /etc/motd >> /etc/update-motd.d/80-motd
    echo 'EOF' >> /etc/update-motd.d/80-motd
    chmod +x /etc/update-motd.d/80-motd
    rm /etc/motd
    ln -s ../var/run/motd /etc/motd
fi

# Enable userdir Apache module when upgrading from olders version to
# 0.9.2 or above
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
    . /usr/share/apache2/apache2-maintscript-helper

    if dpkg --compare-versions "$2" le-nl "0.9.1" ; then
        apache2_invoke enmod userdir
    fi
fi

# Automatically added by dh_installdeb/11.1.4ubuntu1
dpkg-maintscript-helper rm_conffile /etc/init.d/first-run 0.0.43 -- "$@"
# End automatically added section
# Automatically added by dh_installdeb/11.1.4ubuntu1
dpkg-maintscript-helper rm_conffile /etc/init.d/freedombox-first-run 0.10 -- "$@"
# End automatically added section
# Automatically added by dh_installdeb/11.1.4ubuntu1
dpkg-maintscript-helper rm_conffile /etc/init.d/proxy 0.0.43 -- "$@"
# End automatically added section
# Automatically added by dh_installdeb/11.1.4ubuntu1
dpkg-maintscript-helper rm_conffile /etc/init.d/freedombox-client-proxy 0.0.44 -- "$@"
# End automatically added section
# Automatically added by dh_installdeb/11.1.4ubuntu1
dpkg-maintscript-helper rm_conffile /etc/init.d/freedombox-create-uap0 0.9.2~ -- "$@"
# End automatically added section