From 363bfc24cdbc118f533971c6dc842c1204859086 Mon Sep 17 00:00:00 2001 From: Olivier BILHAUT Date: Mon, 29 Jan 2018 17:23:33 +0100 Subject: [PATCH] Restored path_url and changed final_url format --- scripts/install | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 7026281..db798d2 100644 --- a/scripts/install +++ b/scripts/install @@ -30,7 +30,7 @@ ynh_abort_if_errors # Retrieve arguments domain=$YNH_APP_ARG_DOMAIN - pathurl=$YNH_APP_ARG_PATH + path_url=$YNH_APP_ARG_PATH #path=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN member=$YNH_APP_ARG_MEMBER @@ -39,16 +39,20 @@ ynh_abort_if_errors # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= +# First test base directory final_path=/var/www/$app test ! -e "$final_path" || ynh_die "This path already contains a folder" +# Then adjust to dolibarr specificity (app is in htdocs sub-directory) +final_path=/var/www/$app/htdocs/ + # Normalize the url path syntax -pathurl=$(ynh_normalize_url_path $pathurl) +path_url=$(ynh_normalize_url_path $path_url) # Check web path availability -ynh_webpath_available $domain $pathurl +ynh_webpath_available $domain $path_url # Register (book) web path -ynh_webpath_register $app $domain $pathurl +ynh_webpath_register $app $domain $path_url # Correct path: puts a / at the start and nothing at the end