postinst is in liblemonldap-ng-conf-perl 1.1.2-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 | #!/bin/bash
# Maintainer:
set -e
. /usr/share/debconf/confmodule
FIRSTCONFFILE=/var/lib/lemonldap-ng/conf/lmConf-1
CONFDIR=/etc/lemonldap-ng
if [ "$1" == "configure" ]
then
chown -R www-data:www-data /var/lib/lemonldap-ng/conf
chmod 750 /var/lib/lemonldap-ng/conf
chmod 640 /var/lib/lemonldap-ng/conf/*
chgrp www-data /etc/lemonldap-ng/lemonldap-ng.ini
chmod 640 /etc/lemonldap-ng/lemonldap-ng.ini
for i in domain ldapServer ldapPort ldapBase managerDn managerPassword portal; do
db_get liblemonldap-ng-conf-perl/$i || true
perl -000 -i -pe "s#^$i(\\n\\s+)('?)[^\\n]*?('?)\$#$i\${1}\${2}$RET\${3}#m" $FIRSTCONFFILE
done
testversion=`echo $2|sed -e 's/^0\.9.*$/X/'`
if [ "$testversion" = "X" ]; then
if [ -e $CONFDIR/storage.conf -o -e $CONFDIR/apply.conf -o -e $CONFDIR/apps-list.xml ] ; then
db_get liblemonldap-ng-conf-perl/migrate
if [ "$RET" ]; then
# Run migration script
/usr/share/lemonldap-ng/bin/lmMigrateConfFiles2ini 2>&1 > /dev/null || :
fi
fi
fi
fi
exit 0
|