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
26a7b9b035
commit
e75e12e370
3 changed files with 31 additions and 2 deletions
|
@ -26,8 +26,21 @@ mysql-to-pg() {
|
|||
# Migrating from MySQL to PostgreSQL
|
||||
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="\"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="\"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"
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Modifying a config file..." --weight=3
|
||||
|
||||
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"
|
||||
|
||||
chmod 400 "$final_path/config/config.json"
|
||||
chown $app:$app "$final_path/config/config.json"
|
||||
|
||||
# Removinging MySQL database
|
||||
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
||||
|
|
|
@ -152,6 +152,9 @@ url=https://$domain$path_url
|
|||
|
||||
ynh_add_config --template="../conf/config.json" --destination="$final_path/config/config.json"
|
||||
|
||||
chmod 400 "$final_path/config/config.json"
|
||||
chown $app:$app "$final_path/config/config.json"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -177,6 +177,19 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
|||
# Migrating from MySQL to PostgreSQL
|
||||
mysql-to-pg
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Modifying a config file..." --weight=3
|
||||
|
||||
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"
|
||||
|
||||
chmod 400 "$final_path/config/config.json"
|
||||
chown $app:$app "$final_path/config/config.json"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue