mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
Update _common.sh
This commit is contained in:
parent
e75e12e370
commit
d70b9af3bb
1 changed files with 4 additions and 3 deletions
|
@ -17,14 +17,14 @@ mysql-to-pg() {
|
|||
|
||||
ynh_script_progression --message="Migrating to PostgreSQL database..." --weight=10
|
||||
|
||||
mysql_db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
#mysql_db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
|
||||
ynh_psql_test_if_first_run
|
||||
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
||||
#db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
||||
|
||||
# Migrating from MySQL to PostgreSQL
|
||||
pgloader mysql://mattermost:$mysql_db_pwd@localhost:3306/mattermost postgresql://mattermost:$db_pwd@localhost:5432/mattermost
|
||||
pgloader mysql://mattermost:$mysqlpwd@localhost:3306/mattermost postgresql://mattermost:$psqlpwd@localhost:5432/mattermost
|
||||
|
||||
#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"
|
||||
|
@ -36,6 +36,7 @@ mysql-to-pg() {
|
|||
|
||||
smtp_user_pwd=$(ynh_string_random --length=24)
|
||||
url=https://$domain$path_url
|
||||
db_pwd=$(psqlpwd)
|
||||
|
||||
ynh_add_config --template="../conf/config.json" --destination="$final_path/config/config.json"
|
||||
|
||||
|
|
Loading…
Reference in a new issue