diff --git a/scripts/upgrade b/scripts/upgrade index ade6bfd..f1079e3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -3,16 +3,7 @@ # Exit on command errors and treat unset variables as an error set -eu -# This is a multi-instance app, meaning it can be installed several times independently -# The id of the app as stated in the manifest is available as $YNH_APP_ID -# The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...) -# The app instance name is available as $YNH_APP_INSTANCE_NAME -# - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample -# - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2 -# - ynhexample__{N} for the subsequent installations, with N=3,4, ... -# The app instance name is probably what you are interested the most, since this is -# guaranteed to be unique. This is a good unique identifier to define installation path, -# db names, ... +# See comments in install script app=$YNH_APP_INSTANCE_NAME # Source YunoHost helpers @@ -24,6 +15,8 @@ path_url=$(ynh_app_setting_get "$app" path_url) portNginx=$(ynh_find_port 8080) portUnicorn=$(ynh_find_port 9080) +path_url=${path_url%/} + # if path do not begin with / add a / at the begining if [ "${path_url:0:1}" != "/" ]; then path_url="/$path_url"