1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/garradin_ynh.git synced 2024-09-03 18:36:17 +02:00

try to debug slash for root directory in change_url

This commit is contained in:
Robles Rodolphe 2020-04-09 16:23:39 +02:00
parent 462780defa
commit a7541b6d0d

View file

@ -75,12 +75,6 @@ then
path_url="$new_path"
# Create a dedicated nginx config
ynh_add_nginx_config
elif [ "$new_path" == "/" ]
then
ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path';" --target_file="$final_path/config.local.php"
else
ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php"
fi
# Change the domain for nginx
if [ $change_domain -eq 1 ]
@ -101,6 +95,15 @@ ynh_script_progression --message="Reloading nginx web server..." --time --weight
ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# last configuration
#=================================================
if [ $change_path -eq 1 && "$new_path" == "/"]
then
ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path';" --target_file="$final_path/config.local.php"
else
ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php"
fi
#=================================================
# END OF SCRIPT
#=================================================