From e6106c1f3e4da3d0bd35986f09079ab37dc88336 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 26 Jul 2021 12:16:15 +0200 Subject: [PATCH] Fix --- scripts/_common.sh | 2 +- scripts/change_url | 18 ++++-------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 2ccc82f..9388454 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="7.4" # dependencies used by the app #pkg_dependencies="phantomjs gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget" diff --git a/scripts/change_url b/scripts/change_url index 27cd9a0..ed90f04 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -67,13 +67,10 @@ then change_path=1 fi -#================================================= -# STANDARD MODIFICATIONS -#================================================= #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." +ynh_script_progression --message="Updating NGINX web server configuration..." nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf @@ -106,20 +103,13 @@ fi #================================================= ynh_script_progression --message="Modifying a config file..." -config="$final_path/.env" -ynh_backup_if_checksum_is_different --file="$final_path/CONFIG_FILE" +ynh_replace_string --match_string="$old_domain$old_path" --replace_string="$new_domain$new_path" --target_file="$final_path/.env" +ynh_store_file_checksum --file="$final_path/.env" -ynh_replace_string --match_string="$old_domain$old_path" --replace_string="$new_domain$new_path" --target_file="$config" - -ynh_store_file_checksum --file="$config" - -#================================================= -# GENERIC FINALISATION -#================================================= #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload