22 lines
642 B
Plaintext
22 lines
642 B
Plaintext
|
#!/bin/bash
|
||
|
# Maintainer: #DEBHELPER#
|
||
|
|
||
|
. /usr/share/debconf/confmodule
|
||
|
|
||
|
FIRSTCONFFILE=/var/lib/lemonldap-ng/conf/lmConf-1
|
||
|
|
||
|
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/storage.conf
|
||
|
chmod 640 /etc/lemonldap-ng/storage.conf
|
||
|
|
||
|
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
|
||
|
fi
|
||
|
exit 0
|