1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ttrss_ynh.git synced 2024-10-01 13:34:46 +02:00

Update change_url

This commit is contained in:
ericgaspar 2020-08-14 23:26:53 +02:00
parent d5c292c819
commit a54069ea1d
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -27,6 +27,8 @@ app=$YNH_APP_INSTANCE_NAME
ynh_script_progression --message="Loading installation settings..." --weight=1
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
#=================================================
# CHECK WHICH PARTS SHOULD BE CHANGED
@ -80,13 +82,15 @@ fi
#=================================================
ynh_script_progression --message="Configuring ttrss..." --weight=1
domain="$new_domain"
path_url="$new_path"
cp ../conf/config.php "$final_path/config.php"
# Change domain name in config.php
ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$final_path/config.php"
ynh_replace_string --match_string="__DBPWD__" --replace_string="$db_pwd" --target_file="$final_path/config.php"
ynh_replace_string --match_string="__DOMAINPATH__" --replace_string="https://$domain$path_url" --target_file="$final_path/config.php"
ynh_replace_string --match_string="define('SELF_URL_PATH'.*" --replace_string="define('SELF_URL_PATH', 'https://$new_domain$new_path');" --target_file="$final_path/config.php"
# Recalculate and store the config file checksum into the app settings
ynh_store_file_checksum --file="$final_path/config.php"