2021-01-12 18:39:03 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2021-01-20 00:14:00 +01:00
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
2021-01-12 18:39:03 +01:00
|
|
|
|
2024-01-16 21:51:49 +01:00
|
|
|
ynh_change_url_nginx_config
|
2021-01-12 18:39:03 +01:00
|
|
|
|
2021-02-01 11:52:03 +01:00
|
|
|
#=================================================
|
|
|
|
# Update Config file
|
|
|
|
#=================================================
|
2021-07-17 12:00:15 +02:00
|
|
|
|
2024-01-16 21:51:49 +01:00
|
|
|
if [ "$change_path" -eq 1 ]; then
|
|
|
|
# Update config file
|
|
|
|
ynh_replace_string --match_string="'PSM_BASE_URL', '.*'" --replace_string="'PSM_BASE_URL', '$path'" --target_file="$install_dir/config.php"
|
|
|
|
#replace checksum
|
|
|
|
ynh_delete_file_checksum --file="$install_dir/config.php"
|
|
|
|
ynh_store_file_checksum --file="$install_dir/config.php"
|
2021-02-01 11:52:03 +01:00
|
|
|
fi
|
2021-01-12 18:39:03 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2021-07-17 12:00:15 +02:00
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|