diff --git a/debian/ldapsaisie.postinst b/debian/ldapsaisie.postinst index b71747b4..49c0efcb 100644 --- a/debian/ldapsaisie.postinst +++ b/debian/ldapsaisie.postinst @@ -2,3 +2,14 @@ chown www-data:adm /var/tmp/ldapsaisie /var/log/ldapsaisie chmod 750 /var/tmp/ldapsaisie /var/log/ldapsaisie +if test ! -L /etc/ldapsaisie/local +then + echo "Install /etc/ldapsaisie/local symbolic link" + [ -e /etc/ldapsaisie/local ] && mv -f /etc/ldapsaisie/local /etc/ldapsaisie/local.dpkg-old + ln -s /usr/local/share/ldapsaisie /etc/ldapsaisie/local +fi + +if [ -f /usr/local/share/ldapsaisie/conf/config.inc.php.dpkg-move ] +then + mv /usr/local/share/ldapsaisie/conf/config.inc.php.dpkg-move /usr/local/share/ldapsaisie/conf/config.inc.php +fi diff --git a/debian/ldapsaisie.preinst b/debian/ldapsaisie.preinst new file mode 100644 index 00000000..dffee564 --- /dev/null +++ b/debian/ldapsaisie.preinst @@ -0,0 +1,8 @@ +#!/bin/sh + +if test ! -L /etc/ldapsaisie/local +then + echo "Move /etc/ldapsaisie/local in /usr/local/share/ldapsaisie" + mv /etc/ldapsaisie/local /usr/local/share/ldapsaisie + mv /usr/local/share/ldapsaisie/conf/config.inc.php /usr/local/share/ldapsaisie/conf/config.inc.php.dpkg-move +fi diff --git a/debian/rules b/debian/rules index f6932768..1d18daf3 100755 --- a/debian/rules +++ b/debian/rules @@ -29,7 +29,6 @@ install: build find $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie -name .placefolder -exec rm -f {} \; mv $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie/local $(CURDIR)/debian/ldapsaisie/usr/local/share/ldapsaisie - dh_link /usr/local/share/ldapsaisie /etc/ldapsaisie/local find $(CURDIR)/debian/ldapsaisie/usr/local/share/ldapsaisie -type f -exec rm -f \{\} \; dh_link /usr/local/share/ldapsaisie /usr/share/ldapsaisie/local mv $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie/conf/config.inc.php $(CURDIR)/debian/ldapsaisie/usr/local/share/ldapsaisie/conf/