From a8bb3d1711ca3af8f4c3f9b9e479dad9df9955ae Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 7 Apr 2020 16:12:46 +0200 Subject: [PATCH] try to make better check_packages dependencies --- check_process | 2 +- scripts/change_url | 2 ++ scripts/restore | 9 +++------ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/check_process b/check_process index 6da1a82..b1210b1 100644 --- a/check_process +++ b/check_process @@ -6,7 +6,7 @@ ; Checks pkg_linter=1 setup_sub_dir=1 - setup_root=1 + setup_root=0 setup_nourl=0 setup_private=1 setup_public=1 diff --git a/scripts/change_url b/scripts/change_url index 654bb14..0798955 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -80,6 +80,8 @@ then mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf # Store file checksum for the new config file location ynh_store_file_checksum "/etc/nginx/conf.d/$new_domain.d/$app.conf" + # ynh_replace_string + ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php" fi # GENERIC FINALISATION diff --git a/scripts/restore b/scripts/restore index fe8a148..75164ec 100644 --- a/scripts/restore +++ b/scripts/restore @@ -71,12 +71,9 @@ chown -R $app:$app $final_path #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= -if [ "$(lsb_release --codename --short)" != "jessie" ] -then - ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf" -else - ynh_die --message="Votre version de Debian n'est pas compatible..." -fi +ynh_script_progression --message="Restore php-fpm configuration..." --time --weight=1 + +ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf" #================================================= # SPECIFIC RESTORATION