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

Fix missing LDAP plugin configuration

This commit is contained in:
Jimmy Monin 2017-11-19 19:42:54 +01:00
parent 5e28392c61
commit 46947632f8
3 changed files with 5 additions and 2 deletions

1
conf/data.dat Normal file
View file

@ -0,0 +1 @@
a:11:{s:4:"host";s:0:"";s:6:"basedn";s:27:"ou=users,dc=yunohost,dc=org";s:4:"port";s:0:"";s:7:"ld_attr";s:3:"uid";s:9:"ld_binddn";s:0:"";s:9:"ld_bindpw";s:0:"";s:10:"ld_use_ssl";b:0;s:14:"allow_newusers";b:1;s:28:"advertise_admin_new_ldapuser";b:0;s:26:"send_password_by_mail_ldap";b:0;s:8:"ld_group";s:0:"";}

View file

@ -159,8 +159,9 @@ ynh_store_file_checksum "$final_path/local/config/database.inc.php"
# ADD LDAP & FAIL2BAN PLUGINS # ADD LDAP & FAIL2BAN PLUGINS
#================================================= #=================================================
# Activate LDAP plugin # Configure and activate LDAP plugin
ynh_mysql_connect_as $db_name $db_pwd $db_user <<< "INSERT INTO plugins (id,state,version) VALUES ('Ldap_Login','active','1.1');" ynh_mysql_connect_as $db_name $db_pwd $db_user <<< "INSERT INTO plugins (id,state,version) VALUES ('Ldap_Login','active','1.1');"
cp ../conf/data.dat $final_path/plugins/Ldap_Login
# Configure and activate log_failed_logins plugin # Configure and activate log_failed_logins plugin
ynh_mysql_connect_as $db_name $db_pwd $db_user <<< "INSERT INTO plugins (id,state,version) VALUES ('log_failed_logins','active','1.2');" ynh_mysql_connect_as $db_name $db_pwd $db_user <<< "INSERT INTO plugins (id,state,version) VALUES ('log_failed_logins','active','1.2');"

View file

@ -192,8 +192,9 @@ ynh_store_file_checksum "$final_path/local/config/database.inc.php"
# ADD LDAP & FAIL2BAN PLUGINS # ADD LDAP & FAIL2BAN PLUGINS
#================================================= #=================================================
# Activate ldap plugin # Configure and activate LDAP plugin
ynh_mysql_connect_as $db_name $db_pwd $db_user <<< "UPDATE plugins SET state='active' WHERE id='Ldap_Login';" ynh_mysql_connect_as $db_name $db_pwd $db_user <<< "UPDATE plugins SET state='active' WHERE id='Ldap_Login';"
cp ../conf/data.dat $final_path/plugins/Ldap_Login
# Configure and activate log_failed_logins plugin # Configure and activate log_failed_logins plugin
ynh_mysql_connect_as $db_name $db_pwd $db_user <<< "INSERT INTO plugins (id,state,version) VALUES ('log_failed_logins','active','1.2');" 2>&1 > /dev/null ||ynh_mysql_connect_as $db_name $db_pwd $db_user <<< "UPDATE plugins SET state='active' WHERE id='log_failed_logins';" ynh_mysql_connect_as $db_name $db_pwd $db_user <<< "INSERT INTO plugins (id,state,version) VALUES ('log_failed_logins','active','1.2');" 2>&1 > /dev/null ||ynh_mysql_connect_as $db_name $db_pwd $db_user <<< "UPDATE plugins SET state='active' WHERE id='log_failed_logins';"