mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
Fix
This commit is contained in:
parent
4d15d6887e
commit
2d4ae568ff
2 changed files with 7 additions and 5 deletions
|
@ -29,13 +29,15 @@ mysql-to-pg() {
|
|||
# Migrating from MySQL to PostgreSQL
|
||||
pgloader $tmpdir/mysql-to-pg.conf
|
||||
|
||||
ynh_replace_string --match_string="\(\"DriverName\" *: \).*," --replace_string="\"DriverName\": \"postgres\"", --target_file="$final_path/config/config.json"
|
||||
ynh_replace_string --match_string="\(\"DataSource\" *: \).*," --replace_string="\"DataSource\": \"postgres://$db_user:$db_pwd@localhost:5432/$db_name?sslmode=disable&connect_timeout=10\"", --target_file="$final_path/config/config.json"
|
||||
|
||||
# Removinging MySQL database
|
||||
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
||||
ynh_secure_remove --file="$tmpdir"
|
||||
|
||||
else
|
||||
ynh_print_info --message="No migration needed"
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -180,12 +180,12 @@ mysql-to-pg
|
|||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..." --weight=3
|
||||
# ynh_script_progression --message="Updating a configuration file..." --weight=3
|
||||
|
||||
smtp_user_pwd=$(ynh_string_random --length=24)
|
||||
url=https://$domain$path_url
|
||||
# smtp_user_pwd=$(ynh_string_random --length=24)
|
||||
# url=https://$domain$path_url
|
||||
|
||||
ynh_add_config --template="../conf/config.json" --destination="$final_path/config/config.json"
|
||||
# ynh_add_config --template="../conf/config.json" --destination="$final_path/config/config.json"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
|
|
Loading…
Reference in a new issue