diff --git a/README.md b/README.md index 065dc13..a502c56 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Kanboard is a free and open source Kanban project management software. - Drag and drop tasks to manage your project -**Shipped version:** 1.2.33~ynh2 +**Shipped version:** 1.2.33~ynh3 **Demo:** https://demo.yunohost.org/kanboard/ @@ -36,7 +36,7 @@ Kanboard is a free and open source Kanban project management software. ## Documentation and resources * Official app website: -* Official admin documentation: +* Official admin documentation: * Upstream app code repository: * Report a bug: diff --git a/README_fr.md b/README_fr.md index 3ede8f7..647559e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Kanboard est un logiciel de gestion de projet Kanban gratuit et open source. - Glisser et déposez des tâches pour gérer votre projet -**Version incluse :** 1.2.33~ynh2 +**Version incluse :** 1.2.33~ynh3 **Démo :** https://demo.yunohost.org/kanboard/ @@ -36,7 +36,7 @@ Kanboard est un logiciel de gestion de projet Kanban gratuit et open source. ## Documentations et ressources * Site officiel de l’app : -* Documentation officielle de l’admin : +* Documentation officielle de l’admin : * Dépôt de code officiel de l’app : * Signaler un bug : diff --git a/conf/config.php b/conf/config.php index 1060ce3..03b79e6 100644 --- a/conf/config.php +++ b/conf/config.php @@ -42,19 +42,19 @@ define('FILES_DIR', DATA_DIR.DIRECTORY_SEPARATOR.'files'); define('MAIL_CONFIGURATION', true); // E-mail address used for the "From" header (notifications) -define('MAIL_FROM', '__EMAIL__'); +define('MAIL_FROM', 'noreply@__DOMAIN__'); // E-mail address used for the "Bcc" header to send a copy of all notifications define('MAIL_BCC', ''); // Mail transport available: "smtp", "sendmail", "mail" (PHP mail function), "postmark", "mailgun", "sendgrid" -define('MAIL_TRANSPORT', 'mail'); +define('MAIL_TRANSPORT', 'smtp'); // SMTP configuration to use when the "smtp" transport is chosen define('MAIL_SMTP_HOSTNAME', 'localhost'); define('MAIL_SMTP_PORT', 25); -define('MAIL_SMTP_USERNAME', ''); -define('MAIL_SMTP_PASSWORD', ''); +define('MAIL_SMTP_USERNAME', '__APP__'); +define('MAIL_SMTP_PASSWORD', '__MAIL_PWD__'); define('MAIL_SMTP_ENCRYPTION', null); // Valid values are "null", "ssl" or "tls" // Sendmail command to use when the transport is "sendmail" @@ -65,22 +65,22 @@ define('MAIL_SENDMAIL_COMMAND', '/usr/sbin/sendmail -bs'); // Do not run the migrations from multiple processes at the same time (example: web page + background worker) define('DB_RUN_MIGRATIONS', false); -// Database driver: sqlite, mysql or postgres (sqlite by default) +// Database driver: sqlite, mysql, postgres, odbc, dblib, or mssql (sqlite by default) define('DB_DRIVER', 'mysql'); -// Mysql/Postgres username +// Database username define('DB_USERNAME', '__DB_USER__'); -// Mysql/Postgres password +// Database password define('DB_PASSWORD', '__DB_PWD__'); -// Mysql/Postgres hostname +// Database hostname define('DB_HOSTNAME', 'localhost'); -// Mysql/Postgres database name +// Database database name define('DB_NAME', '__DB_NAME__'); -// Mysql/Postgres custom port (null = default port) +// Database custom port (null = default port) define('DB_PORT', null); // Mysql SSL key @@ -98,12 +98,18 @@ define('DB_VERIFY_SERVER_CERT', null); // Timeout value for PDO attribute define('DB_TIMEOUT', null); +// ODBC DSN (default: kanboard) +define('DB_ODBC_DSN', 'kanboard'); + // Enable LDAP authentication (false by default) define('LDAP_AUTH', false); // LDAP server protocol, hostname and port URL (ldap[s]://hostname:port) define('LDAP_SERVER', 'ldap://127.0.0.1:389'); +// LDAP server port (389 by default) +define('LDAP_PORT', 389); + // By default, require certificate to be verified for ldaps:// style URL. Set to false to skip the verification define('LDAP_SSL_VERIFY', true); @@ -135,7 +141,7 @@ define('LDAP_USER_BASE_DN', 'ou=users,dc=yunohost,dc=org'); define('LDAP_USER_FILTER', 'uid=%s'); // LDAP attribute for username -// Example for ActiveDirectory: 'samaccountname' +// Example for ActiveDirectory: 'sAMAccountName' // Example for OpenLDAP: 'uid' define('LDAP_USER_ATTRIBUTE_USERNAME', 'uid'); @@ -207,9 +213,12 @@ define('REVERSE_PROXY_USER_HEADER', 'REMOTE_USER'); // Username of the admin, by default blank define('REVERSE_PROXY_DEFAULT_ADMIN', '__ADMIN__'); -// Header name to use for the username +// Header name to use for the user email define('REVERSE_PROXY_EMAIL_HEADER', 'REMOTE_EMAIL'); +// Header name to use for the user full name +define('REVERSE_PROXY_FULLNAME_HEADER', 'REMOTE_NAME'); + // Default domain to use for setting the email address define('REVERSE_PROXY_DEFAULT_DOMAIN', '__DOMAIN__'); diff --git a/manifest.toml b/manifest.toml index 2e06c03..60cec35 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Kanboard" description.en = "Kanban project management software" description.fr = "Logiciel de gestion de projet Kanban" -version = "1.2.33~ynh2" +version = "1.2.33~ynh3" maintainers = [] @@ -13,8 +13,9 @@ maintainers = [] license = "MIT" website = "https://kanboard.net" demo = "https://demo.yunohost.org/kanboard/" -admindoc = "https://docs.kanboard.org/en/latest/" +admindoc = "https://docs.kanboard.org/" code = "https://github.com/kanboard/kanboard" +fund = "https://kanboard.org/#donations" [integration] yunohost = ">= 11.2" @@ -36,7 +37,7 @@ ram.runtime = "50M" [install.init_main_permission] type = "group" - default = false + default = "visitors" [install.admin] type = "user" @@ -51,7 +52,8 @@ ram.runtime = "50M" autoupdate.strategy = "latest_github_tag" [resources.system_user] - + allow_email = true + [resources.install_dir] [resources.permissions] diff --git a/scripts/install b/scripts/install index d27de19..9bc25ac 100644 --- a/scripts/install +++ b/scripts/install @@ -13,7 +13,6 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -email=$(ynh_user_get_info --username=$admin --key=mail) fpm_footprint="low" fpm_free_footprint=0 fpm_usage="low" @@ -52,6 +51,13 @@ ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint # Create a dedicated NGINX config ynh_add_nginx_config +ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" +chmod 644 "/etc/cron.d/$app" + +# Create a dedicated Fail2Ban config +ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^.*authentication failure\" while reading response header from upstream, client: ,.*$" --max_retry=5 + #================================================= # SPECIFIC SETUP #================================================= @@ -77,25 +83,6 @@ pushd $install_dir php$phpversion cli db:migrate --no-interaction --verbose popd -#================================================= -# SETUP CRON -#================================================= -ynh_script_progression --message="Setuping a cron..." --weight=1 - -ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" -chown root: "/etc/cron.d/$app" -chmod 644 "/etc/cron.d/$app" - -#================================================= -# GENERIC FINALIZATION -#================================================= -# SETUP FAIL2BAN -#================================================= -ynh_script_progression --message="Configuring Fail2Ban..." --weight=10 - -# Create a dedicated Fail2Ban config -ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^.*authentication failure\" while reading response header from upstream, client: ,.*$" --max_retry=5 - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 8ca511f..a54ac47 100644 --- a/scripts/restore +++ b/scripts/restore @@ -38,16 +38,13 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ #================================================= ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 -ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf" -ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf" -ynh_systemd_action --action=restart --service_name=fail2ban - ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -# Recreate a dedicated php-fpm config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion +ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf" +ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf" +ynh_systemd_action --action=restart --service_name=fail2ban ynh_restore_file --origin_path="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" diff --git a/scripts/upgrade b/scripts/upgrade index 160ea05..7fde12f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -65,11 +65,18 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=5 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint # Create a dedicated NGINX config ynh_add_nginx_config +# Create a dedicated Fail2Ban config +ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^.*authentication failure\" while reading response header from upstream, client: ,.*$" --max_retry=5 + +ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" +chmod 644 "/etc/cron.d/$app" + #================================================= # SPECIFIC UPGRADE #================================================= @@ -81,28 +88,9 @@ pushd $install_dir # Launch database migration php$phpversion cli db:migrate --no-interaction --verbose # Launch plugins migration - php$phpversion cli plugin:upgrade --no-interaction --verbose + #php$phpversion cli plugin:upgrade --no-interaction --verbose popd -#================================================= -# SETUP CRON -#================================================= -ynh_script_progression --message="Setuping a cron..." --weight=2 - -ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" -chown root: "/etc/cron.d/$app" -chmod 644 "/etc/cron.d/$app" - -#================================================= -# GENERIC FINALIZATION -#================================================= -# UPGRADE FAIL2BAN -#================================================= -ynh_script_progression --message="Reconfiguring Fail2Ban..." --weight=7 - -# Create a dedicated Fail2Ban config -ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^.*authentication failure\" while reading response header from upstream, client: ,.*$" --max_retry=5 - #================================================= # END OF SCRIPT #=================================================