ldapsaisie/debian/ldapsaisie.postinst
Benjamin Renard 9751771985 Fix /var/cache/ldapsaisie rights only if not changed
Fix /var/cache/ldapsaisie rights only if it own by root:root to allow changed
  by user (for instance, in case of php-fpm use with a custom user/group).
2018-01-08 20:24:21 +01:00

17 lines
444 B
Bash

#!/bin/sh
case "$1" in
configure)
if test "$(stat --format %u:%g /var/cache/ldapsaisie)" = "0:0"
then
chown www-data:adm /var/cache/ldapsaisie /var/log/ldapsaisie
chmod 750 /var/cache/ldapsaisie /var/log/ldapsaisie
fi
break
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
;;
esac