This file is indexed.

postinst is in liblemonldap-ng-common-perl 1.4.6-3.

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

set -e

. /usr/share/debconf/confmodule

CONFDIR=/etc/lemonldap-ng
SESSIONSDIR=/var/lib/lemonldap-ng/sessions
CONFSTORAGEDIR=/var/lib/lemonldap-ng/conf
FIRSTCONFFILE=$CONFSTORAGEDIR/lmConf-1
LMINIFILE=/etc/lemonldap-ng/lemonldap-ng.ini
MIGRATION=/usr/share/lemonldap-ng/bin/lmMigrateConfFiles2ini

if [ "$1" == "configure" ]
then
    for i in domain ldapServer ldapPort ldapBase managerDn managerPassword portal; do
        db_get liblemonldap-ng-common-perl/$i || true
        perl -000 -i -pe "s#^$i(\\n\\s+)('?)[^\\n]*?('?)\$#$i\${1}\${2}$RET\${3}#m" $FIRSTCONFFILE
    done

    # Run migration script to convert menu format if old version is 0.9.*
    if [ "$2" != "" ]; then
        if dpkg --compare-versions "$2" lt 1.0; then
            if [ -e $CONFDIR/storage.conf -o -e $CONFDIR/apply.conf -o -e $CONFDIR/apps-list.xml ] ; then
                db_get liblemonldap-ng-common-perl/migrate
                #if [ "$RET" ]; then
                #    $MIGRATION 2>&1 > /dev/null || :
                #fi
            fi
        fi
    fi
fi


exit 0