From 6944cda5371d165e55f58cc842db8004065121bf Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Sat, 8 Feb 2020 23:32:05 +0100 Subject: [PATCH 01/13] tests: use more recent Yunohost box --- Vagrantfile | 14 +++++++++++++- test.sh | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index ca9abb1..611c8b3 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -11,11 +11,23 @@ Vagrant.configure("2") do |config| # https://docs.vagrantup.com. config.vm.define :ynhtests - config.vm.box = "yunohost/jessie-stable" + config.vm.box = "yunohost-stretch-unstable" + config.vm.box_url = "https://build.yunohost.org/yunohost-stretch-unstable.box" # Disable auto updates checks. Run `vagrant outdated` to perform manual updates. config.vm.box_check_update = false + # Configuration for the vagrant-disksize plugin. + # We need more space because package_check will create many LXC containers and snapshots. + # + # IMPORTANT: when re-creating the VM from scratch, the logical size of the disk will + # still be 10 Go. + # You'll need a live GParted ISO to resize partitions and fix it. + config.disksize.size = '20GB' + + # Force guest type, because YunoHost /etc/issue can't be tuned + config.vm.guest = :debian + # Create a forwarded port mapping which allows access to a specific port # within the machine from a port on the host machine. In the example below, # accessing "localhost:8080" will access port 80 on the guest machine. diff --git a/test.sh b/test.sh index bd52d6f..9514a9a 100755 --- a/test.sh +++ b/test.sh @@ -1,5 +1,7 @@ #!/bin/bash # Run package_check tests against the app in the working directory on a Vagrant virtual machine. +# +# NB: Vagrant is used because package_check uses LXC containers, and Docker doesn't support running LXC. # Fail on first error set -e From 5e72edfc8fbdd397498a6e66fd9b2d54424d4e09 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Sat, 8 Feb 2020 23:32:21 +0100 Subject: [PATCH 02/13] tests: comment out bogus Vagrant settings, that prevent Internet connectivity --- Vagrantfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 611c8b3..5d0bf0c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -40,11 +40,11 @@ Vagrant.configure("2") do |config| # Use the NAT hosts DNS resolver. Fixes slow network in the guest. # See https://serverfault.com/questions/495914/vagrant-slow-internet-connection-in-guest - config.vm.provider "virtualbox" do |v| - v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] - v.customize ["modifyvm", :id, "--natdnsproxy1", "on"] - v.customize ["modifyvm", :id, "--nictype1", "virtio"] - end + #config.vm.provider "virtualbox" do |v| + # v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] + # v.customize ["modifyvm", :id, "--natdnsproxy1", "on"] + # v.customize ["modifyvm", :id, "--nictype1", "virtio"] + #end # Share an additional folder to the guest VM. The first argument is # the path on the host to the actual folder. The second argument is From 849d75bcbc4152bcb496e63711db10061424d821 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Sat, 8 Feb 2020 23:32:38 +0100 Subject: [PATCH 03/13] tests: make default password more complex Otherwise Yunohost rejects it. --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 5d0bf0c..6333f72 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -60,7 +60,7 @@ Vagrant.configure("2") do |config| # documentation for more information about their specific syntax and use. config.vm.provision "shell", privileged: false, keep_color: true, inline: <<-SHELL DOMAIN=ynhtests.local - YUNOHOST_ADMIN_PASSWORD="alpine" + YUNOHOST_ADMIN_PASSWORD="ynhadminpwd" # Stop on first error set -e From f07b4a7822ea193173e9e48384a039bbafe245f7 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Sat, 8 Feb 2020 23:33:19 +0100 Subject: [PATCH 04/13] app: implement subpath support --- README.md | 3 +-- check_process | 7 +++---- conf/nginx.conf | 4 ++-- manifest.json | 10 ++++++++++ scripts/install | 3 ++- scripts/restore | 2 +- scripts/upgrade | 3 ++- 7 files changed, 21 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d6ac03d..c02ca3b 100644 --- a/README.md +++ b/README.md @@ -24,14 +24,13 @@ You can either : ## What works -* Installation on domain's root +* Installation on domain root or sub-directory * Notification emails * Push notifications * Service control in Yunohost Services panel ## TODO -* Allow installation in sub-directory (only root-domains for now, see [#8](https://github.com/YunoHost-Apps/mattermost_ynh/issues/8)) * LDAP integration (only paid Entreprise Edition, see [#58](https://github.com/YunoHost-Apps/mattermost_ynh/issues/58)) ## About telemetrics diff --git a/check_process b/check_process index d57e774..b6d972e 100644 --- a/check_process +++ b/check_process @@ -1,7 +1,7 @@ ;; Mattermost ; Manifest domain="ynhtests.local" (DOMAIN) - path="" (PATH) + path="/path" (PATH) admin_email="john@gmail.com" admin_password="MattermostPassword!42" admin_locale="fr" @@ -10,6 +10,7 @@ analytics=0 ; Checks pkg_linter=1 + setup_sub_dir=1 setup_root=1 setup_private=1 setup_public=1 @@ -20,14 +21,12 @@ # Checks not supported yet change_url=0 # Checks not applicable - setup_sub_dir=0 setup_nourl=0 - incorrect_path=0 ;;; Levels Level 1=auto Level 2=auto Level 3=auto - Level 4=na + Level 4=auto Level 5=auto Level 6=auto Level 7=auto diff --git a/conf/nginx.conf b/conf/nginx.conf index f2daff7..edbf5b1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,6 +1,6 @@ # Directives from the Mattermost installation guide -location ~ /api/v[0-9]+/(users/)?websocket$ { +location ~ __PATH__/api/v[0-9]+/(users/)?websocket$ { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; client_max_body_size 50M; @@ -15,7 +15,7 @@ location ~ /api/v[0-9]+/(users/)?websocket$ { proxy_pass http://127.0.0.1:__PORT__; } -location / { +location __PATH__/ { client_max_body_size 50M; proxy_set_header Connection ""; proxy_set_header Host $http_host; diff --git a/manifest.json b/manifest.json index 44a31c4..d073f82 100644 --- a/manifest.json +++ b/manifest.json @@ -31,6 +31,16 @@ }, "example": "domain.org" }, + { + "name": "path", + "type": "path", + "ask": { + "en": "Choose a path for Mattermost", + "fr": "Choisissez un chemin pour Mattermost" + }, + "example": "/chat", + "default": "/chat" + }, { "name": "is_public", "type": "boolean", diff --git a/scripts/install b/scripts/install index b62c3fc..5df8433 100644 --- a/scripts/install +++ b/scripts/install @@ -21,13 +21,13 @@ ynh_abort_if_errors app=$YNH_APP_INSTANCE_NAME domain=$YNH_APP_ARG_DOMAIN +path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC admin_email=$YNH_APP_ARG_ADMIN_EMAIL admin_password=$YNH_APP_ARG_ADMIN_PASSWORD admin_locale=$YNH_APP_ARG_ADMIN_LOCALE team_display_name=$YNH_APP_ARG_TEAM_DISPLAY_NAME analytics=$YNH_APP_ARG_ANALYTICS -path_url="/" #================================================= # CHECK IF THE APP CAN BE INSTALLED @@ -71,6 +71,7 @@ ynh_webpath_available "$domain" "$path_url" ynh_webpath_register "$app" "$domain" "$path_url" # Store setting ynh_app_setting_set "$app" domain "$domain" +ynh_app_setting_set "$app" path "$path_url" #================================================= # FIND AN AVAILABLE PORT diff --git a/scripts/restore b/scripts/restore index d1f4d44..7aab3b3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -21,7 +21,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) is_public=$(ynh_app_setting_get $app is_public) -path_url="/" +path_url=$(ynh_app_setting_get $app path) final_path="/var/www/$app" data_path="/home/yunohost.app/$app" logs_path="/var/log/$app" diff --git a/scripts/upgrade b/scripts/upgrade index 965f1f8..a09df26 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,6 +21,7 @@ ynh_abort_if_errors app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) +path_url=$(ynh_app_setting_get $app path) # used during nginx configuration is_public=$(ynh_app_setting_get $app is_public) port=$(ynh_app_setting_get $app port) mattermost_user="$app" @@ -55,7 +56,7 @@ ynh_clean_setup () { fi # Restore the backup ynh_restore_upgradebackup - + else # Backup restoration is not available: # let's try at least to restart the server. From d80f335f9d4fc3ebb2dee474d04e2e983b4c9faf Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Sat, 8 Feb 2020 23:33:30 +0100 Subject: [PATCH 05/13] app: improve the manifest file --- manifest.json | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index d073f82..993bd1a 100644 --- a/manifest.json +++ b/manifest.json @@ -18,7 +18,7 @@ "nginx" ], "requirements": { - "yunohost": ">= 2.7.0" + "yunohost": ">= 3.2.0" }, "arguments": { "install" : [ @@ -44,14 +44,15 @@ { "name": "is_public", "type": "boolean", - "ask": { - "en": "Can guest users access this chat?", - "fr": "Les utilisateurs non-enregistrés peuvent-ils accéder à ce chat ?" + "help": { + "en": "Can users non registered on Yunohost access this chat?", + "fr": "Les invités non-enregistrés sur Yunohost peuvent-ils accéder à ce chat ?" }, "default": true }, { "name": "admin_email", + "type": "string", "ask": { "en": "Login email for the chat admin", "fr": "Adresse email de login pour l’administrateur du chat" @@ -70,6 +71,7 @@ }, { "name": "admin_locale", + "type": "string", "ask": { "en": "Choose the language of the chat for the admin", "fr": "Choissisez la langue utilisée pour l'administrateur" @@ -79,11 +81,13 @@ }, { "name": "team_display_name", + "type": "string", "ask": { "en": "Choose a Team name", "fr": "Choisissez le nom de l’équipe" }, - "example": "Super Groupe", + "example": "Team", + "default": "Team", "optional": false }, { From e526f969a97d83e41d29edbfdf6f40c7e5f24e83 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Sat, 8 Feb 2020 23:34:06 +0100 Subject: [PATCH 06/13] scripts: remove the service before removing the systemd config Yunohost complains if the systemd unit doesn't exist when removing the service. --- scripts/remove | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/remove b/scripts/remove index ed12aff..fb9dbda 100755 --- a/scripts/remove +++ b/scripts/remove @@ -24,6 +24,15 @@ logs_path="/var/log/$app" #================================================= # STANDARD REMOVE +#================================================= +#================================================= +# REMOVE SERVICE FROM ADMIN PANEL +#================================================= + +if sudo yunohost service status | grep -q "$app"; then + sudo yunohost service remove "$app" +fi + #================================================= # STOP AND REMOVE SERVICE #================================================= @@ -40,14 +49,6 @@ if [ -f "/etc/supervisor/conf.d/${app}.conf" ]; then sudo ynh_secure_remove --file="/etc/supervisor/conf.d/${app}.conf" fi -#================================================= -# REMOVE SERVICE FROM ADMIN PANEL -#================================================= - -if sudo yunohost service status | grep -q "$app"; then - sudo yunohost service remove "$app" -fi - #================================================= # REMOVE THE MYSQL DATABASE #================================================= From fefff41733fc305cca1c47b6fbf178c133825803 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Sun, 9 Feb 2020 00:27:51 +0100 Subject: [PATCH 07/13] scripts: remove all usages of sudo The scripts are already run as root. --- README.md | 2 +- scripts/install | 54 ++++++++++++++++++++++++------------------------- scripts/remove | 14 ++++++------- scripts/restore | 14 ++++++------- scripts/upgrade | 38 +++++++++++++++++----------------- 5 files changed, 61 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index c02ca3b..ac83478 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A Yunohost package for [Mattermost](http://www.mattermost.org/), an open-source, Mattermost requires: * A x86_64 system (check with `uname -m`), -* Yunohost 2.7 or higher (check in Yunohost Admin panel), +* Yunohost 3.2 or higher (check in Yunohost Admin panel), * MySQL 5.6 or higher, or MariaDB 10 or higher (check with `mysql --version`). ## Installing diff --git a/scripts/install b/scripts/install index 5df8433..226b97c 100644 --- a/scripts/install +++ b/scripts/install @@ -107,7 +107,7 @@ ynh_app_setting_set "$app" mysqlpwd "$db_password" mattermost_user="$app" mattermost_user_password=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d 'A-Za-z0-9' | sed -n 's/\(.\{24\}\).*/\1/p') -sudo useradd -M --shell /bin/false -p $(openssl passwd -1 "$mattermost_user_password") "$mattermost_user" +useradd -M --shell /bin/false -p $(openssl passwd -1 "$mattermost_user_password") "$mattermost_user" ynh_app_setting_set "$app" smtppwd "$mattermost_user_password" #================================================= @@ -117,36 +117,36 @@ ynh_app_setting_set "$app" smtppwd "$mattermost_user_password" ynh_app_setting_set "$app" final_path "$final_path" ynh_setup_source "$final_path" -sudo mkdir -p "$data_path" -sudo mkdir -p "$logs_path" +mkdir -p "$data_path" +mkdir -p "$logs_path" #================================================= # EDIT MATTERMOST CONFIG #================================================= # Configure Service Settings -sudo sed -i "s|\"SiteURL\": \"\"|\"SiteURL\": \"https://${domain}${path_url}\"|g" $final_path/config/config.json -sudo sed -i "s|\"ListenAddress\": \".*\"|\"ListenAddress\": \"127.0.0.1:${port}\"|g" $final_path/config/config.json +sed -i "s|\"SiteURL\": \"\"|\"SiteURL\": \"https://${domain}${path_url}\"|g" $final_path/config/config.json +sed -i "s|\"ListenAddress\": \".*\"|\"ListenAddress\": \"127.0.0.1:${port}\"|g" $final_path/config/config.json # Configure the database connection db_connection_url="${db_user}:${db_password}@tcp(127.0.0.1:3306)/${db_name}?charset=utf8mb4,utf8" -sudo sed -i "s|\"DataSource\": \".*\"|\"DataSource\": \"${db_connection_url}\"|g" $final_path/config/config.json +sed -i "s|\"DataSource\": \".*\"|\"DataSource\": \"${db_connection_url}\"|g" $final_path/config/config.json # Configure uploaded files directory -sudo sed -i "s|\"Directory\": \"./data/\"|\"Directory\": \"${data_path}/\"|g" $final_path/config/config.json +sed -i "s|\"Directory\": \"./data/\"|\"Directory\": \"${data_path}/\"|g" $final_path/config/config.json # Configure SMTP account for sending email notifications -sudo sed -i "s|\"SendEmailNotifications\": false|\"SendEmailNotifications\": true|g" $final_path/config/config.json -sudo sed -i "s|\"FeedbackName\": \"\"|\"FeedbackName\": \"Mattermost notification\"|g" $final_path/config/config.json -sudo sed -i "s|\"FeedbackEmail\": \"\"|\"FeedbackEmail\": \"no-reply@${domain}\"|g" $final_path/config/config.json -sudo sed -i "s|\"SMTPUsername\": \"\"|\"SMTPUsername\": \"${mattermost_user}\"|g" $final_path/config/config.json -sudo sed -i "s|\"SMTPPassword\": \"\"|\"SMTPPassword\": \"${mattermost_user_password}\"|g" $final_path/config/config.json -sudo sed -i "s|\"SMTPServer\": \"\"|\"SMTPServer\": \"localhost\"|g" $final_path/config/config.json -sudo sed -i "s|\"SMTPPort\": \"\"|\"SMTPPort\": \"25\"|g" $final_path/config/config.json +sed -i "s|\"SendEmailNotifications\": false|\"SendEmailNotifications\": true|g" $final_path/config/config.json +sed -i "s|\"FeedbackName\": \"\"|\"FeedbackName\": \"Mattermost notification\"|g" $final_path/config/config.json +sed -i "s|\"FeedbackEmail\": \"\"|\"FeedbackEmail\": \"no-reply@${domain}\"|g" $final_path/config/config.json +sed -i "s|\"SMTPUsername\": \"\"|\"SMTPUsername\": \"${mattermost_user}\"|g" $final_path/config/config.json +sed -i "s|\"SMTPPassword\": \"\"|\"SMTPPassword\": \"${mattermost_user_password}\"|g" $final_path/config/config.json +sed -i "s|\"SMTPServer\": \"\"|\"SMTPServer\": \"localhost\"|g" $final_path/config/config.json +sed -i "s|\"SMTPPort\": \"\"|\"SMTPPort\": \"25\"|g" $final_path/config/config.json # Disable Mattermost debug console by default -sudo sed -i "s|\"EnableConsole\": true|\"EnableConsole\": false|g" $final_path/config/config.json +sed -i "s|\"EnableConsole\": true|\"EnableConsole\": false|g" $final_path/config/config.json # Configure log file location -sudo sed -i "s|\"FileLocation\": \"\"|\"FileLocation\": \"$logs_path\"|g" $final_path/config/config.json +sed -i "s|\"FileLocation\": \"\"|\"FileLocation\": \"$logs_path\"|g" $final_path/config/config.json # Configure analytics according to user choice if [ $analytics -eq 0 ]; then - sudo sed -i "s|\"EnableDiagnostics\": true|\"EnableDiagnostics\": false|g" $final_path/config/config.json + sed -i "s|\"EnableDiagnostics\": true|\"EnableDiagnostics\": false|g" $final_path/config/config.json fi ynh_app_setting_set "$app" analytics "$analytics" @@ -154,9 +154,9 @@ ynh_app_setting_set "$app" analytics "$analytics" # SECURE FILES AND DIRECTORIES #================================================= -sudo chown -R "$mattermost_user:www-data" "$final_path" -sudo chown -R "$mattermost_user:www-data" "$data_path" -sudo chown -R "$mattermost_user:adm" "$logs_path" +chown -R "$mattermost_user:www-data" "$final_path" +chown -R "$mattermost_user:www-data" "$data_path" +chown -R "$mattermost_user:adm" "$logs_path" #================================================= # NGINX CONFIGURATION @@ -174,7 +174,7 @@ ynh_add_systemd_config # ADVERTISE SERVICE IN ADMIN PANEL #================================================= -sudo yunohost service add "$app" --log "$logs_path/mattermost.log" +yunohost service add "$app" --log "$logs_path/mattermost.log" #================================================= # SETUP SSOWAT @@ -191,13 +191,13 @@ fi # RELOAD NGINX #================================================= -sudo systemctl reload nginx +systemctl reload nginx #================================================= # START SERVER #================================================= -sudo systemctl start "$app" +systemctl start "$app" #================================================= # CREATE ADMIN AND FIRST TEAM @@ -207,10 +207,10 @@ admin_username=$(cut -d @ -f 1 <<< "$admin_email") team_name=$(echo "$team_display_name" | iconv -f utf8 -t ascii//TRANSLIT//IGNORE | sed -e 's/[^[:alnum:]]/-/g' | tr -s '-' | tr A-Z a-z) cd "$final_path/bin" -sudo ./mattermost user create --username "$admin_username" --email "$admin_email" --password "$admin_password" --locale "$admin_locale" --system_admin -sudo ./mattermost user verify "$admin_username" -sudo ./mattermost team create --name "$team_name" --display_name "$team_display_name" --email "$admin_email" -sudo ./mattermost team add "$team_name" "$admin_username" +./mattermost user create --username "$admin_username" --email "$admin_email" --password "$admin_password" --locale "$admin_locale" --system_admin +./mattermost user verify "$admin_username" +./mattermost team create --name "$team_name" --display_name "$team_display_name" --email "$admin_email" +./mattermost team add "$team_name" "$admin_username" ynh_app_setting_set "$app" admin_email "$admin_email" ynh_app_setting_set "$app" admin_locale "$admin_locale" diff --git a/scripts/remove b/scripts/remove index fb9dbda..349c576 100755 --- a/scripts/remove +++ b/scripts/remove @@ -29,8 +29,8 @@ logs_path="/var/log/$app" # REMOVE SERVICE FROM ADMIN PANEL #================================================= -if sudo yunohost service status | grep -q "$app"; then - sudo yunohost service remove "$app" +if yunohost service status | grep -q "$app"; then + yunohost service remove "$app" fi #================================================= @@ -38,15 +38,15 @@ fi #================================================= # Remove systemd service -if $(sudo systemctl -q is-active "$app"); then - sudo systemctl stop "$app" +if $(systemctl -q is-active "$app"); then + systemctl stop "$app" fi ynh_remove_systemd_config # Legacy, for older versions of this app which used supervisor if [ -f "/etc/supervisor/conf.d/${app}.conf" ]; then - sudo supervisorctl stop "$app" - sudo ynh_secure_remove --file="/etc/supervisor/conf.d/${app}.conf" + supervisorctl stop "$app" + ynh_secure_remove --file="/etc/supervisor/conf.d/${app}.conf" fi #================================================= @@ -72,7 +72,7 @@ ynh_remove_nginx_config # REMOVE LOG FILE #================================================= -sudo ynh_secure_remove --file="$logs_path" +ynh_secure_remove --file="$logs_path" #================================================= # REMOVE DEDICATED USER diff --git a/scripts/restore b/scripts/restore index 7aab3b3..a4257ce 100644 --- a/scripts/restore +++ b/scripts/restore @@ -82,13 +82,13 @@ fi #================================================= # Restore permissions on app files -sudo chown -R "$mattermost_user:www-data" "$final_path" +chown -R "$mattermost_user:www-data" "$final_path" mkdir -p "$data_path" -sudo chown -R "$mattermost_user:www-data" "$data_path" +chown -R "$mattermost_user:www-data" "$data_path" mkdir -p "$logs_path" -sudo chown -R "$mattermost_user:adm" "$logs_path" +chown -R "$mattermost_user:adm" "$logs_path" #================================================= # RESTORE SSOWAT @@ -109,13 +109,13 @@ fi #================================================= ynh_restore_file "/etc/systemd/system/$app.service" -sudo systemctl enable "$app" +systemctl enable "$app" #================================================= # ADVERTISE SERVICE IN ADMIN PANEL #================================================= -sudo yunohost service add "$app" --log "$logs_path/mattermost.log" +yunohost service add "$app" --log "$logs_path/mattermost.log" #================================================= # GENERIC FINALIZATION @@ -123,10 +123,10 @@ sudo yunohost service add "$app" --log "$logs_path/mattermost.log" # RELOAD NGINX #================================================= -sudo service nginx reload +service nginx reload #================================================= # START SERVER #================================================= -sudo systemctl start "$app" +systemctl start "$app" diff --git a/scripts/upgrade b/scripts/upgrade index a09df26..0e0b1c4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -51,8 +51,8 @@ fi ynh_clean_setup () { if [ "$can_restore_backup" = true ]; then # Stop attempting to restart the app - if $(sudo systemctl -q is-active "$app"); then - sudo systemctl stop "$app" + if $(systemctl -q is-active "$app"); then + systemctl stop "$app" fi # Restore the backup ynh_restore_upgradebackup @@ -60,7 +60,7 @@ ynh_clean_setup () { else # Backup restoration is not available: # let's try at least to restart the server. - sudo systemctl start "$app" + systemctl start "$app" fi } @@ -72,14 +72,14 @@ ynh_abort_if_errors #================================================= # Stop the server (if the app is already using systemd) -if $(sudo systemctl -q is-active "$app"); then - sudo systemctl stop "$app" +if $(systemctl -q is-active "$app"); then + systemctl stop "$app" fi # Legacy, for previous versions of this app which used supervisor if [ -f "/etc/supervisor/conf.d/${app}.conf" ]; then - sudo supervisorctl stop "$app" - sudo rm -f "/etc/supervisor/conf.d/${app}.conf" + supervisorctl stop "$app" + rm -f "/etc/supervisor/conf.d/${app}.conf" fi #================================================= @@ -89,7 +89,7 @@ fi config_file="$final_path/config/config.json" backup_config_file="/tmp/config.json" -sudo cp -f "$config_file" "$backup_config_file" +cp -f "$config_file" "$backup_config_file" #================================================= # MIGRATE SETTINGS FROM PREVIOUS VERSIONS @@ -120,7 +120,7 @@ ynh_setup_source "$final_path" # RESTORE CONFIGURATION FILE #================================================= -sudo cp -f "$backup_config_file" "$config_file" +cp -f "$backup_config_file" "$config_file" #================================================= # NGINX CONFIGURATION @@ -138,7 +138,7 @@ ynh_add_systemd_config # ADVERTISE SERVICE IN ADMIN PANEL #================================================= -sudo yunohost service add "$app" --log "$logs_path/mattermost.log" +yunohost service add "$app" --log "$logs_path/mattermost.log" #================================================= # SPECIFIC UPGRADE STEPS @@ -146,32 +146,32 @@ sudo yunohost service add "$app" --log "$logs_path/mattermost.log" # Fix log FileLocation path (changed in Mattermost 3.8, makes Mattermost >= 4.2 crash) # https://docs.mattermost.com/administration/changelog.html#release-v3-8-3 -sudo sed -i "s|\"FileLocation\": \"/var/log/mattermost.log\"|\"FileLocation\": \"/var/log\"|g" "$config_file" +sed -i "s|\"FileLocation\": \"/var/log/mattermost.log\"|\"FileLocation\": \"/var/log\"|g" "$config_file" # Move log files to a directory (rather than directly in /var/log) # See https://github.com/YunoHost-Apps/mattermost_ynh/issues/61 -sudo mkdir -p "$logs_path" -sudo sed -i "s|\"FileLocation\": \"/var/log\"|\"FileLocation\": \"$logs_path\"|g" "$config_file" +mkdir -p "$logs_path" +sed -i "s|\"FileLocation\": \"/var/log\"|\"FileLocation\": \"$logs_path\"|g" "$config_file" if [ -f "/var/log/${app}.log" ]; then - sudo mv "/var/log/${app}.log" "$logs_path/" + mv "/var/log/${app}.log" "$logs_path/" fi #================================================= # RESTORE FILE PERMISSIONS #================================================= -sudo chown -R "$mattermost_user:www-data" "$final_path" -sudo chown -R "$mattermost_user:www-data" "$data_path" -sudo chown -R "$mattermost_user:adm" "$logs_path" +chown -R "$mattermost_user:www-data" "$final_path" +chown -R "$mattermost_user:www-data" "$data_path" +chown -R "$mattermost_user:adm" "$logs_path" #================================================= # RELOAD NGINX #================================================= -sudo service nginx reload +service nginx reload #================================================= # START SERVER #================================================= -sudo systemctl start "$app" +systemctl start "$app" From 66d31e3171abaa725a041959871f631627243ab8 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Mon, 10 Feb 2020 00:17:56 +0100 Subject: [PATCH 08/13] scripts: use `ynh_replace_string` instead of `sed -i` --- scripts/install | 28 ++++++++++++++-------------- scripts/upgrade | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/install b/scripts/install index 226b97c..3ac2836 100644 --- a/scripts/install +++ b/scripts/install @@ -125,28 +125,28 @@ mkdir -p "$logs_path" #================================================= # Configure Service Settings -sed -i "s|\"SiteURL\": \"\"|\"SiteURL\": \"https://${domain}${path_url}\"|g" $final_path/config/config.json -sed -i "s|\"ListenAddress\": \".*\"|\"ListenAddress\": \"127.0.0.1:${port}\"|g" $final_path/config/config.json +ynh_replace_string --match "\"SiteURL\": \"\"" --replace "\"SiteURL\": \"https://${domain}${path_url}\"" --target $final_path/config/config.json +ynh_replace_string --match "\"ListenAddress\": \".*\"" --replace "\"ListenAddress\": \"127.0.0.1:${port}\"" --target $final_path/config/config.json # Configure the database connection db_connection_url="${db_user}:${db_password}@tcp(127.0.0.1:3306)/${db_name}?charset=utf8mb4,utf8" -sed -i "s|\"DataSource\": \".*\"|\"DataSource\": \"${db_connection_url}\"|g" $final_path/config/config.json +ynh_replace_string --match "\"DataSource\": \".*\"" --replace "\"DataSource\": \"${db_connection_url}\"" --target $final_path/config/config.json # Configure uploaded files directory -sed -i "s|\"Directory\": \"./data/\"|\"Directory\": \"${data_path}/\"|g" $final_path/config/config.json +ynh_replace_string --match "\"Directory\": \"./data/\"" --replace "\"Directory\": \"${data_path}/\"" --target $final_path/config/config.json # Configure SMTP account for sending email notifications -sed -i "s|\"SendEmailNotifications\": false|\"SendEmailNotifications\": true|g" $final_path/config/config.json -sed -i "s|\"FeedbackName\": \"\"|\"FeedbackName\": \"Mattermost notification\"|g" $final_path/config/config.json -sed -i "s|\"FeedbackEmail\": \"\"|\"FeedbackEmail\": \"no-reply@${domain}\"|g" $final_path/config/config.json -sed -i "s|\"SMTPUsername\": \"\"|\"SMTPUsername\": \"${mattermost_user}\"|g" $final_path/config/config.json -sed -i "s|\"SMTPPassword\": \"\"|\"SMTPPassword\": \"${mattermost_user_password}\"|g" $final_path/config/config.json -sed -i "s|\"SMTPServer\": \"\"|\"SMTPServer\": \"localhost\"|g" $final_path/config/config.json -sed -i "s|\"SMTPPort\": \"\"|\"SMTPPort\": \"25\"|g" $final_path/config/config.json +ynh_replace_string --match "\"SendEmailNotifications\": false" --replace "\"SendEmailNotifications\": true" --target $final_path/config/config.json +ynh_replace_string --match "\"FeedbackName\": \"\"" --replace "\"FeedbackName\": \"Mattermost notification\"" --target $final_path/config/config.json +ynh_replace_string --match "\"FeedbackEmail\": \"\"" --replace "\"FeedbackEmail\": \"no-reply@${domain}\"" --target $final_path/config/config.json +ynh_replace_string --match "\"SMTPUsername\": \"\"" --replace "\"SMTPUsername\": \"${mattermost_user}\"" --target $final_path/config/config.json +ynh_replace_string --match "\"SMTPPassword\": \"\"" --replace "\"SMTPPassword\": \"${mattermost_user_password}\"" --target $final_path/config/config.json +ynh_replace_string --match "\"SMTPServer\": \"\"" --replace "\"SMTPServer\": \"localhost\"" --target $final_path/config/config.json +ynh_replace_string --match "\"SMTPPort\": \"\"" --replace "\"SMTPPort\": \"25\"" --target $final_path/config/config.json # Disable Mattermost debug console by default -sed -i "s|\"EnableConsole\": true|\"EnableConsole\": false|g" $final_path/config/config.json +ynh_replace_string --match "\"EnableConsole\": true" --replace "\"EnableConsole\": false" --target $final_path/config/config.json # Configure log file location -sed -i "s|\"FileLocation\": \"\"|\"FileLocation\": \"$logs_path\"|g" $final_path/config/config.json +ynh_replace_string --match "\"FileLocation\": \"\"" --replace "\"FileLocation\": \"$logs_path\"" --target $final_path/config/config.json # Configure analytics according to user choice if [ $analytics -eq 0 ]; then - sed -i "s|\"EnableDiagnostics\": true|\"EnableDiagnostics\": false|g" $final_path/config/config.json + ynh_replace_string --match "\"EnableDiagnostics\": true" --replace "\"EnableDiagnostics\": false" --target $final_path/config/config.json fi ynh_app_setting_set "$app" analytics "$analytics" diff --git a/scripts/upgrade b/scripts/upgrade index 0e0b1c4..a448220 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -146,12 +146,12 @@ yunohost service add "$app" --log "$logs_path/mattermost.log" # Fix log FileLocation path (changed in Mattermost 3.8, makes Mattermost >= 4.2 crash) # https://docs.mattermost.com/administration/changelog.html#release-v3-8-3 -sed -i "s|\"FileLocation\": \"/var/log/mattermost.log\"|\"FileLocation\": \"/var/log\"|g" "$config_file" +ynh_replace_string --match "\"FileLocation\": \"/var/log/mattermost.log\"" --replace "\"FileLocation\": \"/var/log\"" --target "$config_file" # Move log files to a directory (rather than directly in /var/log) # See https://github.com/YunoHost-Apps/mattermost_ynh/issues/61 mkdir -p "$logs_path" -sed -i "s|\"FileLocation\": \"/var/log\"|\"FileLocation\": \"$logs_path\"|g" "$config_file" +ynh_replace_string --match "\"FileLocation\": \"/var/log\"" --replace "\"FileLocation\": \"$logs_path\"" --target "$config_file" if [ -f "/var/log/${app}.log" ]; then mv "/var/log/${app}.log" "$logs_path/" fi From d460d7f2bddf0ea879ad27abff77a99274b336a9 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Sun, 9 Feb 2020 23:30:01 +0000 Subject: [PATCH 09/13] scripts: disable questionnable password complexity rules Enforcing password complexity rules is usually useless, and encourages bad security. However, this is not our main issue. The problem is that when installing Mattermost on Yunohost, if the user chooses a password that doesn't fullfil all these requirements, the installation will fail with a hard- to-spot error message. We don't want this to happen, so we relax the rules a little. Fix #159 --- check_process | 2 +- manifest.json | 4 ++-- scripts/install | 34 ++++++++++++++++++++-------------- scripts/upgrade | 4 ++-- 4 files changed, 25 insertions(+), 19 deletions(-) diff --git a/check_process b/check_process index b6d972e..29aff32 100644 --- a/check_process +++ b/check_process @@ -3,7 +3,7 @@ domain="ynhtests.local" (DOMAIN) path="/path" (PATH) admin_email="john@gmail.com" - admin_password="MattermostPassword!42" + admin_password="admin!42" admin_locale="fr" team_display_name="Mon équipe" is_public=1 (PUBLIC|public=1|private=0) diff --git a/manifest.json b/manifest.json index 993bd1a..8238ec7 100644 --- a/manifest.json +++ b/manifest.json @@ -64,8 +64,8 @@ "name": "admin_password", "type": "password", "ask": { - "en": "Password for the chat admin. Must contain at least 10 characters, one lowercase letter, one uppercase letter, one number, and one symbol (e.g. '~!@#$%^&*()').", - "fr": "Mot de passe pour l’administrateur du chat. Doit contenir au moins 10 caractères, une majuscule, une minuscule, un chiffre, et une ponctuation (ex. '~!@#$%^&*()')." + "en": "Password for the chat admin. At least 8 characters.", + "fr": "Mot de passe pour l’administrateur du chat. Minimum 8 caractères." }, "optional": false }, diff --git a/scripts/install b/scripts/install index 3ac2836..e8b55e6 100644 --- a/scripts/install +++ b/scripts/install @@ -125,28 +125,34 @@ mkdir -p "$logs_path" #================================================= # Configure Service Settings -ynh_replace_string --match "\"SiteURL\": \"\"" --replace "\"SiteURL\": \"https://${domain}${path_url}\"" --target $final_path/config/config.json -ynh_replace_string --match "\"ListenAddress\": \".*\"" --replace "\"ListenAddress\": \"127.0.0.1:${port}\"" --target $final_path/config/config.json +ynh_replace_string --match_string "\"SiteURL\": \"\"" --replace_string "\"SiteURL\": \"https://${domain}${path_url}\"" --target_file $final_path/config/config.json +ynh_replace_string --match_string "\"ListenAddress\": \".*\"" --replace_string "\"ListenAddress\": \"127.0.0.1:${port}\"" --target_file $final_path/config/config.json # Configure the database connection db_connection_url="${db_user}:${db_password}@tcp(127.0.0.1:3306)/${db_name}?charset=utf8mb4,utf8" -ynh_replace_string --match "\"DataSource\": \".*\"" --replace "\"DataSource\": \"${db_connection_url}\"" --target $final_path/config/config.json +ynh_replace_string --match_string "\"DataSource\": \".*\"" --replace_string "\"DataSource\": \"${db_connection_url}\"" --target_file $final_path/config/config.json # Configure uploaded files directory -ynh_replace_string --match "\"Directory\": \"./data/\"" --replace "\"Directory\": \"${data_path}/\"" --target $final_path/config/config.json +ynh_replace_string --match_string "\"Directory\": \"./data/\"" --replace_string "\"Directory\": \"${data_path}/\"" --target_file $final_path/config/config.json # Configure SMTP account for sending email notifications -ynh_replace_string --match "\"SendEmailNotifications\": false" --replace "\"SendEmailNotifications\": true" --target $final_path/config/config.json -ynh_replace_string --match "\"FeedbackName\": \"\"" --replace "\"FeedbackName\": \"Mattermost notification\"" --target $final_path/config/config.json -ynh_replace_string --match "\"FeedbackEmail\": \"\"" --replace "\"FeedbackEmail\": \"no-reply@${domain}\"" --target $final_path/config/config.json -ynh_replace_string --match "\"SMTPUsername\": \"\"" --replace "\"SMTPUsername\": \"${mattermost_user}\"" --target $final_path/config/config.json -ynh_replace_string --match "\"SMTPPassword\": \"\"" --replace "\"SMTPPassword\": \"${mattermost_user_password}\"" --target $final_path/config/config.json -ynh_replace_string --match "\"SMTPServer\": \"\"" --replace "\"SMTPServer\": \"localhost\"" --target $final_path/config/config.json -ynh_replace_string --match "\"SMTPPort\": \"\"" --replace "\"SMTPPort\": \"25\"" --target $final_path/config/config.json +ynh_replace_string --match_string "\"SendEmailNotifications\": false" --replace_string "\"SendEmailNotifications\": true" --target_file $final_path/config/config.json +ynh_replace_string --match_string "\"FeedbackName\": \"\"" --replace_string "\"FeedbackName\": \"Mattermost notification\"" --target_file $final_path/config/config.json +ynh_replace_string --match_string "\"FeedbackEmail\": \"\"" --replace_string "\"FeedbackEmail\": \"no-reply@${domain}\"" --target_file $final_path/config/config.json +ynh_replace_string --match_string "\"SMTPUsername\": \"\"" --replace_string "\"SMTPUsername\": \"${mattermost_user}\"" --target_file $final_path/config/config.json +ynh_replace_string --match_string "\"SMTPPassword\": \"\"" --replace_string "\"SMTPPassword\": \"${mattermost_user_password}\"" --target_file $final_path/config/config.json +ynh_replace_string --match_string "\"SMTPServer\": \"\"" --replace_string "\"SMTPServer\": \"localhost\"" --target_file $final_path/config/config.json +ynh_replace_string --match_string "\"SMTPPort\": \"\"" --replace_string "\"SMTPPort\": \"25\"" --target_file $final_path/config/config.json # Disable Mattermost debug console by default -ynh_replace_string --match "\"EnableConsole\": true" --replace "\"EnableConsole\": false" --target $final_path/config/config.json +ynh_replace_string --match_string "\"EnableConsole\": true" --replace_string "\"EnableConsole\": false" --target_file $final_path/config/config.json # Configure log file location -ynh_replace_string --match "\"FileLocation\": \"\"" --replace "\"FileLocation\": \"$logs_path\"" --target $final_path/config/config.json +ynh_replace_string --match_string "\"FileLocation\": \"\"" --replace_string "\"FileLocation\": \"$logs_path\"" --target_file $final_path/config/config.json +# Disable questionable password complexity rules +ynh_replace_string --match_string "\"MinimumLength\": 10" --replace_string "\"MinimumLength\": 8" --target_file $final_path/config/config.json +ynh_replace_string --match_string "\"Lowercase\": true" --replace_string "\"Lowercase\": false" --target_file $final_path/config/config.json +ynh_replace_string --match_string "\"Number\": true" --replace_string "\"Number\": false" --target_file $final_path/config/config.json +ynh_replace_string --match_string "\"Uppercase\": true" --replace_string "\"Uppercase\": false" --target_file $final_path/config/config.json +ynh_replace_string --match_string "\"Symbol\": true" --replace_string "\"Symbol\": false" --target_file $final_path/config/config.json # Configure analytics according to user choice if [ $analytics -eq 0 ]; then - ynh_replace_string --match "\"EnableDiagnostics\": true" --replace "\"EnableDiagnostics\": false" --target $final_path/config/config.json + ynh_replace_string --match_string "\"EnableDiagnostics\": true" --replace_string "\"EnableDiagnostics\": false" --target_file $final_path/config/config.json fi ynh_app_setting_set "$app" analytics "$analytics" diff --git a/scripts/upgrade b/scripts/upgrade index a448220..df4af82 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -146,12 +146,12 @@ yunohost service add "$app" --log "$logs_path/mattermost.log" # Fix log FileLocation path (changed in Mattermost 3.8, makes Mattermost >= 4.2 crash) # https://docs.mattermost.com/administration/changelog.html#release-v3-8-3 -ynh_replace_string --match "\"FileLocation\": \"/var/log/mattermost.log\"" --replace "\"FileLocation\": \"/var/log\"" --target "$config_file" +ynh_replace_string --match_string "\"FileLocation\": \"/var/log/mattermost.log\"" --replace_string "\"FileLocation\": \"/var/log\"" --target_file "$config_file" # Move log files to a directory (rather than directly in /var/log) # See https://github.com/YunoHost-Apps/mattermost_ynh/issues/61 mkdir -p "$logs_path" -ynh_replace_string --match "\"FileLocation\": \"/var/log\"" --replace "\"FileLocation\": \"$logs_path\"" --target "$config_file" +ynh_replace_string --match_string "\"FileLocation\": \"/var/log\"" --replace_string "\"FileLocation\": \"$logs_path\"" --target_file "$config_file" if [ -f "/var/log/${app}.log" ]; then mv "/var/log/${app}.log" "$logs_path/" fi From 695542d295ab38209ca2d2e90cb41fa43bc139c0 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Mon, 10 Feb 2020 01:15:54 +0100 Subject: [PATCH 10/13] readme: mention raspberry pi won't work --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ac83478..61a89ba 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A Yunohost package for [Mattermost](http://www.mattermost.org/), an open-source, Mattermost requires: -* A x86_64 system (check with `uname -m`), +* A x86_64 system (check with `uname -m`) (ARM Raspberry Pi won’t work, sorry), * Yunohost 3.2 or higher (check in Yunohost Admin panel), * MySQL 5.6 or higher, or MariaDB 10 or higher (check with `mysql --version`). From f00398be3c32e32a147824e3019e45f0440ffb00 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Mon, 10 Feb 2020 01:39:37 +0100 Subject: [PATCH 11/13] scripts: use helper for generating random passwords --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index e8b55e6..7972c68 100644 --- a/scripts/install +++ b/scripts/install @@ -97,7 +97,7 @@ logs_path="/var/log/$app" db_name="$app" db_user="mmuser" -db_password=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d 'A-Za-z0-9' | sed -n 's/\(.\{24\}\).*/\1/p') +db_password=$(ynh_string_random --length=24) ynh_mysql_create_db "$db_name" "$db_user" "$db_password" ynh_app_setting_set "$app" mysqlpwd "$db_password" @@ -106,7 +106,7 @@ ynh_app_setting_set "$app" mysqlpwd "$db_password" #================================================= mattermost_user="$app" -mattermost_user_password=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d 'A-Za-z0-9' | sed -n 's/\(.\{24\}\).*/\1/p') +mattermost_user_password=$(ynh_string_random --length=24) useradd -M --shell /bin/false -p $(openssl passwd -1 "$mattermost_user_password") "$mattermost_user" ynh_app_setting_set "$app" smtppwd "$mattermost_user_password" From 6826e253b40dcf8ec4ebf7aa6b00c91a875f7b14 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Tue, 18 Feb 2020 22:31:15 +0100 Subject: [PATCH 12/13] scripts: use a per-instance db username The scripts still uses "mmuser" by default, for retro-compatibility. --- scripts/install | 5 +++-- scripts/remove | 3 ++- scripts/restore | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index a11a6d9..ca07780 100644 --- a/scripts/install +++ b/scripts/install @@ -96,10 +96,11 @@ logs_path="/var/log/$app" #================================================= db_name="$app" -db_user="mmuser" +db_user="$YNH_APP_INSTANCE_NAME" db_password=$(ynh_string_random --length=24) ynh_mysql_create_db "$db_name" "$db_user" "$db_password" -ynh_app_setting_set "$app" mysqlpwd "$db_password" +ynh_app_setting_set "$app" mysqluser "$db_user" +ynh_app_setting_set "$app" mysqlpwd "$db_password" #================================================= # CREATE USER FOR EMAIL NOTIFICATIONS diff --git a/scripts/remove b/scripts/remove index 349c576..8f3dfc1 100755 --- a/scripts/remove +++ b/scripts/remove @@ -16,7 +16,8 @@ source /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) db_name="$app" -db_user="mmuser" +db_user=$(ynh_app_setting_get $app mysqluser) +db_user=${db_user:-"mmuser"} mattermost_user="$app" final_path="/var/www/$app" data_path="/home/yunohost.app/$app" diff --git a/scripts/restore b/scripts/restore index a4257ce..14f9617 100644 --- a/scripts/restore +++ b/scripts/restore @@ -26,7 +26,8 @@ final_path="/var/www/$app" data_path="/home/yunohost.app/$app" logs_path="/var/log/$app" db_name="$app" -db_user="mmuser" +db_user=$(ynh_app_setting_get $app mysqluser) +db_user=${db_user:-"mmuser"} mattermost_user="$app" #================================================= From 532864f91eee0037de3eee074ff4c5fd189eae84 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Thu, 20 Feb 2020 21:34:05 +0100 Subject: [PATCH 13/13] manifest: lower the required Yunohost version All helpers are available starting from Yunohost 2.7.2, but I'm not sure we still install under jessie. --- README.md | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 61a89ba..b5ff8ca 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A Yunohost package for [Mattermost](http://www.mattermost.org/), an open-source, Mattermost requires: * A x86_64 system (check with `uname -m`) (ARM Raspberry Pi won’t work, sorry), -* Yunohost 3.2 or higher (check in Yunohost Admin panel), +* Yunohost 3.0 or higher (check in Yunohost Admin panel), * MySQL 5.6 or higher, or MariaDB 10 or higher (check with `mysql --version`). ## Installing diff --git a/manifest.json b/manifest.json index 8238ec7..4a83745 100644 --- a/manifest.json +++ b/manifest.json @@ -18,7 +18,7 @@ "nginx" ], "requirements": { - "yunohost": ">= 3.2.0" + "yunohost": ">= 3.0.0" }, "arguments": { "install" : [