Commit 24e385bb authored by HgO's avatar HgO
Browse files

Merge branch '11-fix-404-error' into 'develop'

Fix empty webpath

See merge request Neutrinet/neutrinet_ynh!17
parents e4582913 67e76732
......@@ -16,6 +16,7 @@ source _common.sh
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
path=$(ynh_app_setting_get $app path)
path_url=$(ynh_app_setting_get $app path_url)
app_user=$(ynh_app_setting_get $app app_user)
www_path=$(ynh_app_setting_get $app www_path)
......@@ -53,13 +54,12 @@ if [[ -z $app_user ]]; then
fi
if [[ -z $path_url ]]; then
path_url=$(ynh_app_setting_get $app path)
path_url=$path
if [[ -z $path_url ]]; then
ynh_die "Missing path url!"
else
ynh_app_setting_set $app path_url $path_url
ynh_app_setting_delete $app path
fi
fi
......@@ -69,6 +69,13 @@ if [[ $path_url == */ ]]; then
ynh_app_setting_set $app path_url $path_url
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
#=================================================
......
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