diff --git a/conf/config.json b/conf/config.json index 54aecd3..bf5e9a2 100644 --- a/conf/config.json +++ b/conf/config.json @@ -228,7 +228,7 @@ "ReplyToAddress": "", "FeedbackOrganization": "", "EnableSMTPAuth": false, - "SMTPUsername": "__USER__", + "SMTPUsername": "mattermost", "SMTPPassword": "__USER_PW__", "SMTPServer": "localhost", "SMTPPort": "25", diff --git a/manifest.json b/manifest.json index f628a74..b946125 100644 --- a/manifest.json +++ b/manifest.json @@ -40,7 +40,7 @@ "fr": "Choisissez un chemin pour Mattermost" }, "example": "/mattermost", - "default": "/mattermost" + "default": "/chat" }, { "name": "is_public", diff --git a/scripts/install b/scripts/install index 77505c4..ef8f81f 100644 --- a/scripts/install +++ b/scripts/install @@ -74,7 +74,6 @@ ynh_script_progression --message="Creating a MySQL database..." --weight=10 db_name=$(ynh_sanitize_dbid --db_name=$app) db_user=$db_name -#db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name @@ -134,15 +133,12 @@ cp ../conf/config.json $final_path/config/config.json # Main config File ynh_replace_string --match_string="__URL__" --replace_string="https://$domain$path_url" --target_file="$final_path/config/config.json" ynh_replace_string --match_string="__PORT__" --replace_string="127.0.0.1:$port" --target_file="$final_path/config/config.json" -ynh_replace_string --match_string="__DB_NAME__" --replace_string=$db_name --target_file="$final_path/config/config.json" -ynh_replace_string --match_string="__DB_USER__" --replace_string=$db_user --target_file="$final_path/config/config.json" -ynh_replace_string --match_string="__DB_PASS__" --replace_string=$db_pwd --target_file="$final_path/config/config.json" -ynh_replace_string --match_string="__DATA__" --replace_string=$data_path --target_file="$final_path/config/config.json" - +ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config/config.json" +ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$final_path/config/config.json" +ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="$final_path/config/config.json" +ynh_replace_string --match_string="__DATA__" --replace_string="$data_path" --target_file="$final_path/config/config.json" ynh_replace_string --match_string="__FEEDBACK__" --replace_string="no-reply@${domain}" --target_file="$final_path/config/config.json" -ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="$final_path/config/config.json" ynh_replace_string --match_string="__USER_PW__" --replace_string="$(ynh_string_random --length=24)" --target_file="$final_path/config/config.json" - ynh_replace_string --match_string="__LOG__" --replace_string="$logs_path" --target_file="$final_path/config/config.json" ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/config/config.json" diff --git a/scripts/upgrade b/scripts/upgrade index afd924d..5a6a4f0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -59,29 +59,6 @@ if ! [[ "$port" ]]; then ynh_app_setting_set --app=$app --key=port --value=$port fi -# # Language if not present -# if ! [[ "$language" ]]; then -# language="en" -# ynh_app_setting_set --app=$app --key=language --value=$language -# fi - -# # Cleaning legacy permissions -# if ynh_legacy_permissions_exists; then -# ynh_legacy_permissions_delete_all - -# ynh_app_setting_delete --app=$app --key=is_public -# fi - -# if ! ynh_permission_exists --permission="admin"; then -# # Create the required permissions -# ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin -# fi - -# # Create a permission if needed -# if ! ynh_permission_exists --permission="api"; then -# ynh_permission_create --permission="api" --url "/api" --allowed="visitors" --show_tile="false" --protected="true" -# fi - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #=================================================