#!/bin/bash #================================================= # IMPORT GENERIC HELPERS #================================================= source _common.sh source /usr/share/yunohost/helpers #================================================= # MODIFY URL IN NGINX CONF #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 ynh_change_url_nginx_config #================================================= # SPECIFIC MODIFICATIONS #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_replace_string --target_file="$install_dir/.env" \ --match_string="APP_URL=https://$old_domain" \ --replace_string="APP_URL=https://$new_domain" pushd "$install_dir" ynh_exec_as "$app" "php$phpversion" artisan config:clear -n ynh_exec_as "$app" "php$phpversion" artisan config:cache -n popd #================================================= # END OF SCRIPT #================================================= ynh_script_progression --message="Change of URL completed for $app" --last