From ef4ed69b65dd94465eea99048406ce4a76498a30 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 9 May 2019 19:57:27 +0200 Subject: [PATCH] Use path_url instead of path, because helpers require it --- scripts/install | 8 ++++---- scripts/restore | 4 ++-- scripts/upgrade | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index b3583d9..bc40133 100644 --- a/scripts/install +++ b/scripts/install @@ -34,18 +34,18 @@ app=$YNH_APP_INSTANCE_NAME # Retrieve arguments domain=$YNH_APP_ARG_DOMAIN -path=$YNH_APP_ARG_PATH +path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC redirect_type=$YNH_APP_ARG_REDIRECT_TYPE redirect_path=$YNH_APP_ARG_REDIRECT_PATH # Remove trailing slash to path -path=${path%/} +path_url=${path_url%/} #force location to be / or /foo -location=${path:-/} +location=${path_url:-/} # Check domain/path availability -ynh_webpath_register $app $domain $path +ynh_webpath_register $app $domain $path_url # Validate redirect path url_regex='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]' diff --git a/scripts/restore b/scripts/restore index f7c05f6..09c6e2d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -39,13 +39,13 @@ app=$YNH_APP_INSTANCE_NAME # Retrieve arguments domain=$(ynh_app_setting_get "$app" domain) -path=$(ynh_app_setting_get "$app" path) +path_url=$(ynh_app_setting_get "$app" path_url) is_public=$(ynh_app_setting_get "$app" is_public) redirect_type=$(ynh_app_setting_get "$app" redirect_type) redirect_path=$(ynh_app_setting_get "$app" redirect_path) # Remove trailing slash to path -path=${path%/} +path_url=${path_url%/} # Check domain/path availability ynh_webpath_register $app $domain $path diff --git a/scripts/upgrade b/scripts/upgrade index 0a53309..b1a124f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -31,7 +31,7 @@ app=$YNH_APP_INSTANCE_NAME # Retrieve arguments domain=$(ynh_app_setting_get "$app" domain) -path=$(ynh_app_setting_get "$app" path) +path_url=$(ynh_app_setting_get "$app" path) is_public=$(ynh_app_setting_get "$app" is_public) redirect_type=$(ynh_app_setting_get "$app" redirect_type) redirect_path=$(ynh_app_setting_get "$app" redirect_path) @@ -70,9 +70,9 @@ ynh_clean_setup () { ynh_abort_if_errors # Remove trailing slash to path -path=${path%/} +path_url=${path_url%/} #force location to be / or /foo -location=${path:-/} +location=${path_url:-/} # Validate redirect path url_regex='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'