1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flarum_ynh.git synced 2024-09-03 18:36:24 +02:00

Fix sql template files and their variables

Notably, permission was hardcoded to "flarum" instead of app id.
This commit is contained in:
tituspijean 2021-05-05 00:03:43 +02:00
parent 8b0895ad98
commit 48388b9172
5 changed files with 6 additions and 3 deletions

View file

@ -2,7 +2,7 @@ INSERT INTO `settings` (`key`, `value`) VALUES
('tituspijean-auth-ldap.admin_dn', ''), ('tituspijean-auth-ldap.admin_dn', ''),
('tituspijean-auth-ldap.admin_password', ''), ('tituspijean-auth-ldap.admin_password', ''),
('tituspijean-auth-ldap.base_dn', 'ou=users,dc=yunohost,dc=org'), ('tituspijean-auth-ldap.base_dn', 'ou=users,dc=yunohost,dc=org'),
('tituspijean-auth-ldap.filter', '(&(objectClass=posixAccount)(permission=cn=flarum.main,ou=permission,dc=yunohost,dc=org))'), ('tituspijean-auth-ldap.filter', '(&(objectClass=posixAccount)(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))'),
('tituspijean-auth-ldap.follow_referrals', '0'), ('tituspijean-auth-ldap.follow_referrals', '0'),
('tituspijean-auth-ldap.hosts', 'localhost'), ('tituspijean-auth-ldap.hosts', 'localhost'),
('tituspijean-auth-ldap.method_name', 'YunoHost'), ('tituspijean-auth-ldap.method_name', 'YunoHost'),

View file

@ -1,7 +1,7 @@
INSERT INTO `settings` (`key`, `value`) VALUES INSERT INTO `settings` (`key`, `value`) VALUES
('mail_driver', 'mail'), ('mail_driver', 'mail'),
('mail_encryption', 'ssl'), ('mail_encryption', 'ssl'),
('mail_from', '$app@$domain'), ('mail_from', '__APP__@__DOMAIN__'),
('mail_host', 'localhost'), ('mail_host', 'localhost'),
('mail_port', '587') ('mail_port', '587')
ON DUPLICATE KEY UPDATE value = VALUES(value); ON DUPLICATE KEY UPDATE value = VALUES(value);

View file

@ -7,7 +7,7 @@
"fr": "Un forum de nouvelle génération, simplement.", "fr": "Un forum de nouvelle génération, simplement.",
"de": "Forum der nächsten Generation leicht gemacht." "de": "Forum der nächsten Generation leicht gemacht."
}, },
"version": "0.1.0.16~ynh1", "version": "0.1.0.16~ynh2",
"url": "http://flarum.org/", "url": "http://flarum.org/",
"license": "MIT", "license": "MIT",
"maintainer": { "maintainer": {

View file

@ -168,11 +168,13 @@ pushd $final_path
popd popd
# Email setup # Email setup
ynh_add_config --template="../conf/mail.sql.template" --destination="../conf/mail.sql"
ynh_mysql_connect_as --user=$app --password="$db_pwd" --database=$db_name < ../conf/mail.sql ynh_mysql_connect_as --user=$app --password="$db_pwd" --database=$db_name < ../conf/mail.sql
# Enable and set up the LDAP auth extension # Enable and set up the LDAP auth extension
ynh_script_progression --message="Enabling and configuring LDAP extension..." --weight=2 ynh_script_progression --message="Enabling and configuring LDAP extension..." --weight=2
activate_flarum_extension $db_name "tituspijean-auth-ldap" activate_flarum_extension $db_name "tituspijean-auth-ldap"
ynh_add_config --template="../conf/ldap.sql.template" --destination="../conf/ldap.sql"
ynh_mysql_connect_as --user=$app --password="$db_pwd" --database=$db_name < ../conf/ldap.sql ynh_mysql_connect_as --user=$app --password="$db_pwd" --database=$db_name < ../conf/ldap.sql
# Install, activate and set language extensions # Install, activate and set language extensions

View file

@ -202,6 +202,7 @@ then
# Install and activate the LDAP auth extension # Install and activate the LDAP auth extension
activate_flarum_extension $db_name "tituspijean-auth-ldap" activate_flarum_extension $db_name "tituspijean-auth-ldap"
# Configure LDAP auth extension # Configure LDAP auth extension
ynh_add_config --template="../conf/ldap.sql.template" --destination="../conf/ldap.sql"
ynh_mysql_connect_as --user=$app --password="$db_pwd" --database=$db_name < ../conf/ldap.sql ynh_mysql_connect_as --user=$app --password="$db_pwd" --database=$db_name < ../conf/ldap.sql
fi fi