diff --git a/conf/ldap.sql b/conf/ldap.sql.template similarity index 92% rename from conf/ldap.sql rename to conf/ldap.sql.template index 46531f1..3aaca50 100644 --- a/conf/ldap.sql +++ b/conf/ldap.sql.template @@ -2,7 +2,7 @@ INSERT INTO `settings` (`key`, `value`) VALUES ('tituspijean-auth-ldap.admin_dn', ''), ('tituspijean-auth-ldap.admin_password', ''), ('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.hosts', 'localhost'), ('tituspijean-auth-ldap.method_name', 'YunoHost'), diff --git a/conf/mail.sql b/conf/mail.sql.template similarity index 83% rename from conf/mail.sql rename to conf/mail.sql.template index 82a7545..46840de 100644 --- a/conf/mail.sql +++ b/conf/mail.sql.template @@ -1,7 +1,7 @@ INSERT INTO `settings` (`key`, `value`) VALUES ('mail_driver', 'mail'), ('mail_encryption', 'ssl'), - ('mail_from', '$app@$domain'), + ('mail_from', '__APP__@__DOMAIN__'), ('mail_host', 'localhost'), ('mail_port', '587') ON DUPLICATE KEY UPDATE value = VALUES(value); diff --git a/manifest.json b/manifest.json index c9644f8..78699a1 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "fr": "Un forum de nouvelle génération, simplement.", "de": "Forum der nächsten Generation leicht gemacht." }, - "version": "0.1.0.16~ynh1", + "version": "0.1.0.16~ynh2", "url": "http://flarum.org/", "license": "MIT", "maintainer": { diff --git a/pull_request_template.md b/pull_request_template.md index d9b47e9..6043c45 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -13,6 +13,6 @@ ## Package_check results --- -*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results* +* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* + -[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/flarum_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/flarum_ynh%20PR-NUM-%20(USERNAME)/) diff --git a/scripts/_common.sh b/scripts/_common.sh index cc9a5d5..f668ce3 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,6 +8,8 @@ pkg_dependencies="" swap_needed=1024 YNH_PHP_VERSION="7.3" +YNH_COMPOSER_VERSION="2.0.13" + extra_php_dependencies="php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-dom php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-pdo-mysql php${YNH_PHP_VERSION}-tokenizer php${YNH_PHP_VERSION}-zip" diff --git a/scripts/install b/scripts/install index 10b96da..d7438bb 100644 --- a/scripts/install +++ b/scripts/install @@ -168,11 +168,13 @@ pushd $final_path popd # 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 # Enable and set up the LDAP auth extension ynh_script_progression --message="Enabling and configuring LDAP extension..." --weight=2 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 # Install, activate and set language extensions diff --git a/scripts/upgrade b/scripts/upgrade index 66b80fd..d77a2ab 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -202,6 +202,7 @@ then # Install and activate the LDAP auth extension activate_flarum_extension $db_name "tituspijean-auth-ldap" # 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 fi