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:
parent
a7541b6d0d
commit
ac3153d399
1 changed files with 7 additions and 6 deletions
|
@ -73,8 +73,15 @@ then
|
|||
# Set global variables for nginx helper
|
||||
domain="$old_domain"
|
||||
path_url="$new_path"
|
||||
if [ "$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
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
fi
|
||||
|
||||
# Change the domain for nginx
|
||||
if [ $change_domain -eq 1 ]
|
||||
|
@ -98,12 +105,6 @@ 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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue