31 lines
1.0 KiB
Bash
31 lines
1.0 KiB
Bash
#!/bin/bash
|
|
# Maintainer: #DEBHELPER#
|
|
|
|
. /usr/share/debconf/confmodule
|
|
|
|
EXAMPLEPORTALFILE=/usr/share/doc/liblemonldap-ng-portal-perl/examples/index.pl
|
|
PORTALFILE=/var/lib/lemonldap-ng/portal/index.pl
|
|
EXAMPLECLEANERFILE=/usr/share/doc/liblemonldap-ng-portal-perl/examples/scripts/purgeCentralCache
|
|
CLEANERFILE=/usr/share/lemonldap-ng/bin/purgeCentralCache
|
|
SESSIONSDIR=/var/lib/lemonldap-ng/sessions
|
|
|
|
if [ "$1" == "configure" ]
|
|
then
|
|
[ -e $PORTALFILE ] || \
|
|
perl -000 -pe 's/(configStorage\s*=>\s*){[^}]+}/$1\$Lemonldap::NG::Conf::configStorage/;
|
|
s#^use#\nrequire "/usr/share/lemonldap-ng/configStorage.pm";\nuse#m;' \
|
|
$EXAMPLEPORTALFILE >$PORTALFILE
|
|
[ -e $CLEANERFILE ] || \
|
|
perl -000 -pe 's/(configStorage\s*=>\s*){[^}]+}/$1\$Lemonldap::NG::Conf::configStorage/;
|
|
s#^use#\nrequire "/usr/share/lemonldap-ng/configStorage.pm";\nuse#m;' \
|
|
$EXAMPLECLEANERFILE >$CLEANERFILE
|
|
chmod +x $PORTALFILE
|
|
chmod +x $CLEANERFILE
|
|
chmod 770 $SESSIONSDIR
|
|
chmod 770 $SESSIONSDIR/lock
|
|
chown -R www-data.www-data $SESSIONSDIR
|
|
fi
|
|
|
|
|
|
|