#!/bin/bash source _common.sh source /usr/share/yunohost/helpers #================================================= # MODIFY URL IN NGINX CONF #================================================= ynh_script_progression "Updating NGINX web server configuration..." ynh_config_change_url_nginx #================================================= # SPECIFIC MODIFICATIONS #================================================= # UPGRADE A CONFIGURATION #================================================= ynh_script_progression "Updating configuration..." domain=${new_domain%/} path=${new_path%/} dir="__DIR__" ynh_backup_if_checksum_is_different "$install_dir/config.php" if [ "$new_path" == "/" ]; then ynh_config_add --template="config-domain.php" --destination="$install_dir/config.php" else ynh_config_add --template="config-path.php" --destination="$install_dir/config.php" fi ynh_store_file_checksum "$install_dir/config.php" #================================================= # END OF SCRIPT #================================================= ynh_script_progression "Change of URL completed for $app"