From 41a69686b24cbd1a7a5a1f06a4a1fd18c0c94e04 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Thu, 26 Jan 2017 00:08:25 +0100 Subject: [PATCH] Avoid errors between and /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games --- scripts/install | 8 ++++---- scripts/restore | 6 +++--- scripts/upgrade | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index f1b2bf4..a9e6add 100755 --- a/scripts/install +++ b/scripts/install @@ -17,7 +17,7 @@ app=$YNH_APP_INSTANCE_NAME # Retrieve arguments domain=$YNH_APP_ARG_DOMAIN -path=$YNH_APP_ARG_PATH +path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC language=$YNH_APP_ARG_LANGUAGE @@ -31,8 +31,8 @@ ynh_app_setting_set "$app" is_public "$is_public" ynh_app_setting_set "$app" language "$language" # Check domain/path availability -sudo yunohost app checkurl "${domain}${path}" -a "$app" \ - || ynh_die "Path not available: ${domain}${path}" +sudo yunohost app checkurl "${domain}${path_url}" -a "$app" \ + || ynh_die "Path not available: ${domain}${path_url}" # Copy source files src_path=/var/www/$app @@ -61,7 +61,7 @@ sudo chown -R root: $src_path # Modify Nginx configuration file and copy it to Nginx conf directory nginx_conf=../conf/nginx.conf -sed -i "s@YNH_WWW_PATH@$path@g" $nginx_conf +sed -i "s@YNH_WWW_PATH@$path_url@g" $nginx_conf sed -i "s@YNH_WWW_ALIAS@$src_path/@g" $nginx_conf # If a dedicated php-fpm process is used: # Don't forget to modify ../conf/nginx.conf accordingly or your app will not work! diff --git a/scripts/restore b/scripts/restore index a83fa6d..93169e9 100755 --- a/scripts/restore +++ b/scripts/restore @@ -14,11 +14,11 @@ source /usr/share/yunohost/helpers # Retrieve old app settings domain=$(ynh_app_setting_get "$app" domain) -path=$(ynh_app_setting_get "$app" path) +path_url=$(ynh_app_setting_get "$app" path_url) # Check domain/path availability -sudo yunohost app checkurl "${domain}${path}" -a "$app" \ - || ynh_die "Path not available: ${domain}${path}" +sudo yunohost app checkurl "${domain}${path_url}" -a "$app" \ + || ynh_die "Path not available: ${domain}${path_url}" # Restore sources & data src_path="/var/www/${app}" diff --git a/scripts/upgrade b/scripts/upgrade index 1decc77..2dffa9f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,13 +11,13 @@ source /usr/share/yunohost/helpers # Retrieve app settings domain=$(ynh_app_setting_get "$app" domain) -path=$(ynh_app_setting_get "$app" path) +path_url=$(ynh_app_setting_get "$app" path_url) admin=$(ynh_app_setting_get "$app" admin) is_public=$(ynh_app_setting_get "$app" is_public) language=$(ynh_app_setting_get "$app" language) # Remove trailing "/" for next commands -path=${path%/} +path_url=${path_url%/} # Copy source files src_path=/var/www/$app @@ -30,7 +30,7 @@ sudo chown -R root: $src_path # Modify Nginx configuration file and copy it to Nginx conf directory nginx_conf=../conf/nginx.conf -sed -i "s@YNH_WWW_PATH@$path@g" $nginx_conf +sed -i "s@YNH_WWW_PATH@$path_url@g" $nginx_conf sed -i "s@YNH_WWW_ALIAS@$src_path/@g" $nginx_conf # If a dedicated php-fpm process is used: #