Commit eae812e2 authored by Xavier Guimard's avatar Xavier Guimard

Debian bug #656458 :

* 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
parent 676b214c
......@@ -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/*
......
/etc/lemonldap-ng/handler-apache2.conf /etc/apache2/sites-available/handler-apache2.conf
......@@ -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
#!/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
/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
#!/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
/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
......@@ -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
......@@ -10,3 +10,7 @@ then
db_purge
fi
if [ "$1" == "purge" ]
then
rm -f /var/lib/lemonldap-ng/portal/portal.wsdl
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment