do not install lam.conf if other config files exist

This commit is contained in:
Roland Gruber 2019-12-15 16:23:09 +01:00
parent c2a8501cac
commit 023d5c833c
1 changed files with 6 additions and 3 deletions

View File

@ -51,9 +51,12 @@ chown www-data /var/lib/ldap-account-manager/tmp/internal
chmod 700 /var/lib/ldap-account-manager/tmp
chown -R www-data /var/lib/ldap-account-manager/config
chmod 700 /var/lib/ldap-account-manager/config
if [ ! -f /var/lib/ldap-account-manager/config/lam.conf ]; \
then cp /var/lib/ldap-account-manager/config/unix.conf.sample /var/lib/ldap-account-manager/config/lam.conf; \
chown www-data /var/lib/ldap-account-manager/config/lam.conf; fi
ls -l /var/lib/ldap-account-manager/config/*.conf &> /dev/null
cfgFilesExist=$?
if [ $cfgFilesExist != 0 ]; then
cp /var/lib/ldap-account-manager/config/unix.conf.sample /var/lib/ldap-account-manager/config/lam.conf;
chown www-data /var/lib/ldap-account-manager/config/lam.conf;
fi
chmod 600 /var/lib/ldap-account-manager/config/*.conf
if [ "$1" = "configure" ]; then
db_get "ldap-account-manager/alias"