Commit 67e76732 authored by HgO's avatar HgO
Browse files

Fix empty webpath

parent e4582913
...@@ -16,6 +16,7 @@ source _common.sh ...@@ -16,6 +16,7 @@ source _common.sh
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain) domain=$(ynh_app_setting_get $app domain)
path=$(ynh_app_setting_get $app path)
path_url=$(ynh_app_setting_get $app path_url) path_url=$(ynh_app_setting_get $app path_url)
app_user=$(ynh_app_setting_get $app app_user) app_user=$(ynh_app_setting_get $app app_user)
www_path=$(ynh_app_setting_get $app www_path) www_path=$(ynh_app_setting_get $app www_path)
...@@ -53,13 +54,12 @@ if [[ -z $app_user ]]; then ...@@ -53,13 +54,12 @@ if [[ -z $app_user ]]; then
fi fi
if [[ -z $path_url ]]; then if [[ -z $path_url ]]; then
path_url=$(ynh_app_setting_get $app path) path_url=$path
if [[ -z $path_url ]]; then if [[ -z $path_url ]]; then
ynh_die "Missing path url!" ynh_die "Missing path url!"
else else
ynh_app_setting_set $app path_url $path_url ynh_app_setting_set $app path_url $path_url
ynh_app_setting_delete $app path
fi fi
fi fi
...@@ -69,6 +69,13 @@ if [[ $path_url == */ ]]; then ...@@ -69,6 +69,13 @@ if [[ $path_url == */ ]]; then
ynh_app_setting_set $app path_url $path_url ynh_app_setting_set $app path_url $path_url
fi fi
# path setting is needed by Yunohost
# when path is empty, Yunohost thinks the app is on the domain root
if [[ "$path" != "$path_url" ]]; then
path=$path_url
ynh_app_setting_set $app path $path
fi
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment