* Create links using dh_link
* Remove files when "purge" is called

Other : change /var/lib/lemonldap-ng/sessions owner with Common and not with
other components
This commit is contained in:
Xavier Guimard 2012-02-20 16:06:23 +00:00
parent 676b214ce9
commit eae812e263
9 changed files with 38 additions and 43 deletions

View File

@ -7,9 +7,13 @@ set -e
FIRSTCONFFILE=/var/lib/lemonldap-ng/conf/lmConf-1
CONFDIR=/etc/lemonldap-ng
SESSIONSDIR=/var/lib/lemonldap-ng/sessions
if [ "$1" == "configure" ]
then
chmod 770 $SESSIONSDIR
chmod 770 $SESSIONSDIR/lock
chown -R www-data:www-data $SESSIONSDIR
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/*

View File

@ -0,0 +1,2 @@
/etc/lemonldap-ng/handler-apache2.conf /etc/apache2/sites-available/handler-apache2.conf

View File

@ -12,15 +12,6 @@ SESSIONSDIR=/var/lib/lemonldap-ng/sessions
if [ "$1" == "configure" ]
then
[ -e $HANDLERFILE ] || cp $EXAMPLEHANDLERFILE $HANDLERFILE
chmod 770 $SESSIONSDIR
chmod 770 $SESSIONSDIR/lock
chown -R www-data:www-data $SESSIONSDIR
[ -d /etc/apache2/sites-available/ ] && \
[ ! -e /etc/apache2/sites-available/handler-apache2.conf ] && \
ln -s /etc/lemonldap-ng/handler-apache2.conf /etc/apache2/sites-available/handler-apache2.conf \
|| true
fi

View File

@ -0,0 +1,17 @@
#!/bin/bash
# Maintainer: #DEBHELPER#
set -e
. /usr/share/debconf/confmodule
if [ "$1" == "configure" ]
then
db_purge
fi
if [ "$1" == "purge" ]
then
rm -f /var/lib/lemonldap-ng/handler/MyHandler.pm
fi

View File

@ -0,0 +1,5 @@
/etc/lemonldap-ng/manager-apache2.conf /etc/apache2/sites-available/manager-apache2.conf
/usr/share/lemonldap-ng/manager/index.pl /var/lib/lemonldap-ng/manager/index.pl
/usr/share/lemonldap-ng/manager/notifications.pl /var/lib/lemonldap-ng/manager/notifications.pl
/usr/share/lemonldap-ng/manager/sessions.pl /var/lib/lemonldap-ng/manager/sessions.pl

View File

@ -1,23 +0,0 @@
#!/bin/bash
# Maintainer: #DEBHELPER#
set -e
. /usr/share/debconf/confmodule
REFDIR=/usr/share/lemonldap-ng/manager/
RUNDIR=/var/lib/lemonldap-ng/manager/
FILES=$(find $REFDIR -name '*pl' -printf "%f ")
if [ "$1" == "configure" ]
then
for file in $FILES; do
[ -e "$RUNDIR$file" ] || ln -s $REFDIR$file $RUNDIR$file
done
[ -d /etc/apache2/sites-available/ ] && \
[ ! -e /etc/apache2/sites-available/manager-apache2.conf ] && \
ln -s /etc/lemonldap-ng/manager-apache2.conf /etc/apache2/sites-available/manager-apache2.conf \
|| true
fi

View File

@ -0,0 +1,6 @@
/etc/lemonldap-ng/portal-apache2.conf /etc/apache2/sites-available/portal-apache2.conf
/usr/share/lemonldap-ng/portal/cdc.pl /var/lib/lemonldap-ng/portal/cdc.pl
/usr/share/lemonldap-ng/portal/index.pl /var/lib/lemonldap-ng/portal/index.pl
/usr/share/lemonldap-ng/portal/mail.pl /var/lib/lemonldap-ng/portal/mail.pl
/usr/share/lemonldap-ng/portal/metadata.pl /var/lib/lemonldap-ng/portal/metadata.pl

View File

@ -15,17 +15,6 @@ WSDLFILE=/var/lib/lemonldap-ng/portal/portal.wsdl
if [ "$1" == "configure" ]
then
for file in $FILES; do
[ -e "$RUNDIR$file" ] || ln -s $REFDIR$file $RUNDIR$file
done
chmod 770 $SESSIONSDIR
chmod 770 $SESSIONSDIR/lock
chown -R www-data:www-data $SESSIONSDIR
$BUILDPORTALWSDL > $WSDLFILE || true
[ -d /etc/apache2/sites-available/ ] && \
[ ! -e /etc/apache2/sites-available/portal-apache2.conf ] && \
ln -s /etc/lemonldap-ng/portal-apache2.conf /etc/apache2/sites-available/portal-apache2.conf \
|| true
fi

View File

@ -10,3 +10,7 @@ then
db_purge
fi
if [ "$1" == "purge" ]
then
rm -f /var/lib/lemonldap-ng/portal/portal.wsdl
fi