mirror of
https://github.com/YunoHost-Apps/moodle_ynh.git
synced 2024-09-03 19:46:23 +02:00
Update change_url
This commit is contained in:
parent
ab0b5505eb
commit
710e160955
1 changed files with 7 additions and 5 deletions
|
@ -95,12 +95,14 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
||||||
|
|
||||||
domain=${new_domain%/}
|
#domain=${new_domain%/}
|
||||||
path="/${new_path%/}"
|
#path="/${new_path%/}"
|
||||||
|
|
||||||
sed -i "s/wwwroot = '.*'/wwwroot = \'https:\/\/$domain$path\'/" "$final_path/config.php"
|
if [ "$new_path" == "/" ]; then
|
||||||
|
ynh_replace_string --match_string="\$CFG->wwwroot = .*" --replace_string="\$CFG->wwwroot = \'https:\/\/${new_domain%\/}\';" --target_file="$final_path/config.php"
|
||||||
#ynh_replace_string --match_string="\$CFG->wwwroot = .*" --replace_string="\$CFG->wwwroot = 'https://' . '${new_domain%/}' . '${new_path%/}';" --target_file="$final_path/config.php"
|
else
|
||||||
|
ynh_replace_string --match_string="\$CFG->wwwroot = .*" --replace_string="\$CFG->wwwroot = \'https:\/\/${new_domain}${new_path%\/}\';" --target_file="$final_path/config.php"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Reference in a new issue