From 5eca1486b864ca46d2275d8ec6fcea1fad0b9f4c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 29 Apr 2019 16:44:21 +0200 Subject: [PATCH 1/3] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index cbcb32c..75a4eae 100644 --- a/check_process +++ b/check_process @@ -19,7 +19,7 @@ multi_instance=1 incorrect_path=1 port_already_use=0 - change_url=0 + change_url=1 ;;; Levels Level 1=auto Level 2=auto From 8cf4c73012eb840b01e32ef508901791efc30c5e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 29 Apr 2019 17:04:57 +0200 Subject: [PATCH 2/3] fix __NAME__ --- conf/nginx.conf | 2 +- scripts/install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index c892fbf..3985f26 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __FINALPATH__/__APP__/ ; + alias __FINALPATH__/__NAME__/ ; index index.php; if (!-e $request_filename) { diff --git a/scripts/install b/scripts/install index 2513228..3b57867 100644 --- a/scripts/install +++ b/scripts/install @@ -95,7 +95,7 @@ mkdir -p "$final_path" ynh_print_info --message="Configuring nginx web server..." # Create a dedicated nginx config -ynh_add_nginx_config "app" +ynh_add_nginx_config #================================================= # CREATE DEDICATED USER From 99f8151878803cd914b4d8f2148b9d824db5be51 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 29 Apr 2019 17:05:12 +0200 Subject: [PATCH 3/3] implement change_url --- scripts/change_url | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index 20f68b0..0bff0b1 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -83,8 +83,16 @@ fi #================================================= # SPECIFIC MODIFICATIONS #================================================= -# ... +# UPDATE DRUSH ALIAS #================================================= +ynh_print_info --message="Updating Drush alias..." + +cp -f "../conf/yoursite.aliases.drushrc.php" "$final_path/.drush/$app.aliases.drushrc.php" + +ynh_replace_string "__FINALPATH__" "$final_path" "$final_path/.drush/$app.aliases.drushrc.php" +ynh_replace_string "__APP__" "$app" "$final_path/.drush/$app.aliases.drushrc.php" +ynh_replace_string "__DOMAIN__" "$new_domain" "$final_path/.drush/$app.aliases.drushrc.php" +ynh_replace_string "__PATH_URL__" "$new_path" "$final_path/.drush/$app.aliases.drushrc.php" #================================================= # GENERIC FINALISATION