1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rainloop_ynh.git synced 2024-09-03 20:16:18 +02:00

Fix domain loop

This commit is contained in:
Jeff 2015-10-23 09:26:52 +02:00
parent 542bd4ba61
commit aa209f8f04

View file

@ -72,11 +72,11 @@ sudo php ../conf/config.php --index="$rainloop_path/index.php" --password="$pass
# Add default domain configs by looping through all the domains already added # Add default domain configs by looping through all the domains already added
sudo mkdir -p $rainloop_path/data/_data_/_default_/domains/ sudo mkdir -p $rainloop_path/data/_data_/_default_/domains/
# get list of ldap domaine # get list of ldap domains
domains=`ldapsearch -LLL -x -b ou=domains,dc=yunohost,dc=org -s one "objectclass=top" virtualdomain | grep -v "dn:" | sed "s/virtualdomain://" ` alldomains=`ldapsearch -LLL -x -b ou=domains,dc=yunohost,dc=org -s one "objectclass=top" virtualdomain | grep -v "dn:" | sed "s/virtualdomain://" `
for domain in $domains ; do for alldomain in $alldomains ; do
sudo cp ../conf/data/domains/domain.tld.ini $rainloop_path/data/_data_/_default_/domains/$domain.ini sudo cp ../conf/data/domains/domain.tld.ini $rainloop_path/data/_data_/_default_/domains/$alldomain.ini
sudo sed -i "s@domain.tld@$domain@g" $rainloop_path/data/_data_/_default_/domains/$domain.ini sudo sed -i "s@domain.tld@$alldomain@g" $rainloop_path/data/_data_/_default_/domains/$alldomain.ini
done done
sudo cp ../conf/data/domains/disabled $rainloop_path/data/_data_/_default_/domains/disabled sudo cp ../conf/data/domains/disabled $rainloop_path/data/_data_/_default_/domains/disabled