2020-05-02 10:17:12 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2022-09-01 02:13:26 +02:00
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
2020-05-02 10:17:12 +02:00
|
|
|
|
2024-01-05 23:51:07 +01:00
|
|
|
ynh_change_url_nginx_config
|
2020-05-02 10:17:12 +02:00
|
|
|
|
2020-06-15 15:10:10 +02:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
# MODIFY A CONFIG FILE
|
|
|
|
#=================================================
|
2022-09-01 02:13:26 +02:00
|
|
|
ynh_script_progression --message="Modifying a config file..." --weight=1
|
2020-06-15 15:10:10 +02:00
|
|
|
|
2024-01-05 23:51:07 +01:00
|
|
|
config="$install_dir/.env"
|
|
|
|
ynh_backup_if_checksum_is_different --file="$install_dir/CONFIG_FILE"
|
2020-06-15 15:10:10 +02:00
|
|
|
|
|
|
|
ynh_replace_string --match_string="$old_domain$old_path" --replace_string="$new_domain$new_path" --target_file="$config"
|
|
|
|
|
|
|
|
ynh_store_file_checksum --file="$config"
|
|
|
|
|
2020-05-02 10:17:12 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2022-09-01 02:13:26 +02:00
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|