mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
Cleaning
This commit is contained in:
parent
24a1bf5602
commit
cb5c1f2529
6 changed files with 16 additions and 120 deletions
107
manifest.json
107
manifest.json
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue