diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 7c79493..0000000 --- a/manifest.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "name": "Mattermost", - "id": "mattermost", - "packaging_format": 1, - "description": { - "en": "Open source collaboration platform built for developers", - "fr": "Plateforme de collaboration open source conçue pour les développeurs" - }, - "version": "7.5.2~ynh1", - "url": "http://www.mattermost.org/", - "upstream": { - "license": "GPL-3.0-only", - "website": "http://www.mattermost.org/", - "admindoc": "https://docs.mattermost.com/guides/deployment.html", - "userdoc": "https://docs.mattermost.com/guides/messaging.html", - "code": "https://github.com/mattermost/mattermost-server", - "cpe": "cpe:2.3:a:mattermost:mattermost" - }, - "license": "GPL-3.0-only", - "maintainer": { - "name": "pmorinerie", - "email": "kemenaran@gmail.com" - }, - "multi_instance": true, - "services": [ - "nginx", - "mysql" - ], - "requirements": { - "yunohost": ">= 11.1.6" - }, - "arguments": { - "install": [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "path", - "type": "path", - "example": "/mattermost", - "default": "/mattermost" - }, - { - "name": "is_public", - "type": "boolean", - "help": { - "en": "If enabled, Mattermost will be accessible by the user without a YunoHost account. This can be changed later via the webadmin.", - "fr": "Si cette case est cochée, Mattermost sera accessible par l'utilisateur sans compte YunoHost. Vous pourrez changer ceci plus tard via l’interface d’administration." - }, - "default": true - }, - { - "name": "admin", - "type": "user" - }, - { - "name": "password", - "type": "password" - }, - { - "name": "version", - "type": "string", - "ask": { - "en": "Choose the version you want to install", - "fr": "Choisissez la version que vous souhaitez installer" - }, - "help": { - "en": "Use Team Edition for the open source version (ARM, ARM64 and x86-64 support) or Enterprise Edition if you want to use a license (x86-64 support only)", - "fr": "Utilisez Team Edition pour la version open source (prise en charge ARM, ARM64 et x86-64) ou Enterprise Edition si vous souhaitez utiliser une licence (prise en charge x86-64 uniquement)" - }, - "choices": [ - "Enterprise", - "Team" - ], - "default": "Team" - }, - { - "name": "language", - "type": "string", - "ask": { - "en": "Choose the language of the chat for the admin", - "fr": "Choissisez la langue utilisée pour l'administrateur" - }, - "choices": [ - "de", - "en", - "es", - "fr", - "it", - "pt" - ], - "default": "en" - }, - { - "name": "team_display_name", - "type": "string", - "ask": { - "en": "Choose a Team name", - "fr": "Choisissez le nom de l’équipe" - }, - "example": "Team", - "default": "Team" - } - ] - } -} diff --git a/scripts/change_url b/scripts/change_url index 81f256a..6c0b4cc 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -27,7 +27,7 @@ app=$YNH_APP_INSTANCE_NAME ynh_script_progression --message="Loading installation settings..." --weight=1 # Needed for helper "ynh_add_nginx_config" -final_path=$(ynh_app_setting_get --app=$app --key=final_path) +install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) port=$(ynh_app_setting_get --app=$app --key=port) #================================================= @@ -109,10 +109,10 @@ fi ynh_script_progression --message="Modifying a config file..." --weight=3 # Main config File -ynh_replace_string --match_string="\"SiteURL\": \".*\"" --replace_string="\"SiteURL\": \"https://${new_domain}${new_path}\"" --target_file="$final_path/config/config.json" -ynh_replace_string --match_string="\"FeedbackEmail\": \".*\"" --replace_string="\"FeedbackEmail\": \"no-reply@${new_domain}\"" --target_file="$final_path/config/config.json" +ynh_replace_string --match_string="\"SiteURL\": \".*\"" --replace_string="\"SiteURL\": \"https://${new_domain}${new_path}\"" --target_file="$install_dir/config/config.json" +ynh_replace_string --match_string="\"FeedbackEmail\": \".*\"" --replace_string="\"FeedbackEmail\": \"no-reply@${new_domain}\"" --target_file="$install_dir/config/config.json" -ynh_store_file_checksum --file="$final_path/config/config.json" +ynh_store_file_checksum --file="$install_dir/config/config.json" #================================================= # GENERIC FINALISATION diff --git a/scripts/install b/scripts/install index 9317f93..a4b110c 100644 --- a/scripts/install +++ b/scripts/install @@ -22,7 +22,7 @@ version=$YNH_APP_ARG_VERSION #================================================= ynh_script_progression --message="Storing installation settings..." --weight=6 -ynh_app_setting_set --app=$app --key=language --value=$language +#ynh_app_setting_set --app=$app --key=language --value=$language ynh_app_setting_set --app=$app --key=version --value=$version ynh_app_setting_set --app=$app --key=team_display_name --value=$team_display_name diff --git a/scripts/restore b/scripts/restore index e04a2da..a6ba731 100644 --- a/scripts/restore +++ b/scripts/restore @@ -32,13 +32,13 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Restoring the data directory..." --weight=4 -ynh_restore_file --origin_path="$data_path" --not_mandatory +ynh_restore_file --origin_path="$data_dir" --not_mandatory -mkdir -p $data_path +mkdir -p $data_dir -chmod 750 "$data_path" -chmod -R o-rwx "$data_path" -chown -R $app:www-data "$data_path" +chmod 750 "$data_dir" +chmod -R o-rwx "$data_dir" +chown -R $app:www-data "$data_dir" #================================================= # RESTORE THE DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 01eb882..a40beec 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -40,7 +40,7 @@ if [ -z "$version" ]; then fi # If install_dir doesn't exist, create it -if [ -z "$data_path" ]; then +if [ -z "$data_dir" ]; then data_path=data_dir data_dir="/home/yunohost.app/$app" ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir diff --git a/tests.toml b/tests.toml index ce71724..2392a4a 100644 --- a/tests.toml +++ b/tests.toml @@ -11,8 +11,11 @@ test_format = 1.0 args.version = "Enterprise" args.team_display_name = "Mon équipe" -["Test with Team Edition"] +["Test-with-Team-Edition"] only = ["install.subdir", "backup_restore", "upgrade" ] + + args.email = "john@gmail.com" + args.admin_password = "admin!42" args.version = "Team" - + args.team_display_name = "Mon équipe"