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
3545e78629
commit
5a0a1683f1
1 changed files with 6 additions and 7 deletions
|
@ -22,25 +22,24 @@ mysql-to-pg() {
|
||||||
|
|
||||||
ynh_psql_test_if_first_run
|
ynh_psql_test_if_first_run
|
||||||
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||||
|
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
|
||||||
|
|
||||||
|
|
||||||
# Migrating from MySQL to PostgreSQL
|
# Migrating from MySQL to PostgreSQL
|
||||||
pgloader mysql://mattermost:$mysql_db_pwd@localhost:3306/mattermost postgresql://mattermost:$db_pwd@localhost:5432/mattermost
|
pgloader mysql://mattermost:$mysql_db_pwd@localhost:3306/mattermost postgresql://mattermost:$db_pwd@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="\"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"
|
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"
|
||||||
|
|
||||||
ynh_psql_execute_as_root --sql "DROP TABLE schema_migrations"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY A CONFIG FILE
|
# MODIFY A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
#ynh_script_progression --message="Modifying a config file..." --weight=3
|
#ynh_script_progression --message="Modifying a config file..." --weight=3
|
||||||
|
|
||||||
smtp_user_pwd=$(ynh_string_random --length=24)
|
#smtp_user_pwd=$(ynh_string_random --length=24)
|
||||||
url=https://$domain$path_url
|
#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"
|
||||||
|
|
||||||
# Removinging MySQL database
|
# Removinging MySQL database
|
||||||
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
||||||
|
|
Loading…
Reference in a new issue