1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mattermost_ynh.git synced 2024-09-03 19:36:29 +02:00

Cleaning up

This commit is contained in:
ericgaspar 2021-01-12 00:01:16 +01:00
parent 705b3da0e7
commit 7586f58759
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 6 additions and 33 deletions

View file

@ -228,7 +228,7 @@
"ReplyToAddress": "",
"FeedbackOrganization": "",
"EnableSMTPAuth": false,
"SMTPUsername": "__USER__",
"SMTPUsername": "mattermost",
"SMTPPassword": "__USER_PW__",
"SMTPServer": "localhost",
"SMTPPort": "25",

View file

@ -40,7 +40,7 @@
"fr": "Choisissez un chemin pour Mattermost"
},
"example": "/mattermost",
"default": "/mattermost"
"default": "/chat"
},
{
"name": "is_public",

View file

@ -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"

View file

@ -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
#=================================================