1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hubzilla_ynh.git synced 2024-09-03 19:26:21 +02:00

Added ldap support & changed the line for addding admin mail in .htconfig.php

This commit is contained in:
Anmol 2017-07-20 10:39:07 +05:30
parent 308fb41937
commit 5b3a62851f
3 changed files with 14 additions and 2 deletions

7
conf/ldap_conf.php Normal file
View file

@ -0,0 +1,7 @@
App::$config['system']['addon'] = 'ldapauth';
App::$config['ldapauth']['ldap_server'] = 'localhost';
App::$config['ldapauth']['ldap_searchdn'] = 'ou=users,dc=yunohost,dc=org';
App::$config['ldapauth']['ldap_userattr'] = 'uid';
App::$config['ldapauth']['ldap_autocreateaccount_emailattribute'] = 'mail';
App::$config['ldapauth']['create_account'] = '1';

View file

@ -85,7 +85,9 @@ sudo sed -i "s/mysqlusername/$db_user/g" $final_path/.htconfig.php
sudo sed -i "s/mysqldatabasename/$db_user/g" $final_path/.htconfig.php
sudo sed -i "s/mysite.example/$domain/g" $final_path/.htconfig.php
sudo sed -i "s/if the auto install failed, put a unique random string here/$(ynh_string_random)$(ynh_string_random)$(ynh_string_random)/g" $final_path/.htconfig.php
sudo sed -i "s/ADMIN_EMAIL_REPLACE/$email/g" $final_path/.htconfig.php
sudo sed -i "s/\['admin_email'\] = '';/\['admin_email'\] = '$email';/g" $final_path/.htconfig.php
# addon ldap config
sudo su -c "cat ../conf/ldap_conf.php >> $final_path/.htconfig.php"
# Set www-data to owner
sudo chown -R www-data:www-data $final_path

View file

@ -58,7 +58,10 @@ sudo sed -i "s/mysqlusername/$db_user/g" $final_path/.htconfig.php
sudo sed -i "s/mysqldatabasename/$db_user/g" $final_path/.htconfig.php
sudo sed -i "s/mysite.example/$domain/g" $final_path/.htconfig.php
sudo sed -i "s/if the auto install failed, put a unique random string here/$(ynh_string_random)$(ynh_string_random)$(ynh_string_random)/g" $final_path/.htconfig.php
sudo sed -i "s/ADMIN_EMAIL_REPLACE/$email/g" $final_path/.htconfig.php
sudo sed -i "s/\['admin_email'\] = '';/\['admin_email'\] = '$email';/g" $final_path/.htconfig.php
# addon ldap config
sudo su -c "cat ../conf/ldap_conf.php >> $final_path/.htconfig.php"
# Set www-data to owner
sudo chown -R www-data:www-data $final_path