mirror of
https://github.com/YunoHost-Apps/garradin_ynh.git
synced 2024-09-03 18:36:17 +02:00
change also the path for change_url
This commit is contained in:
parent
a30d4f7675
commit
2df243aa9d
1 changed files with 2 additions and 3 deletions
|
@ -53,6 +53,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
||||||
|
final_path=/var/www/$app
|
||||||
|
|
||||||
# Change the path in the nginx config file
|
# Change the path in the nginx config file
|
||||||
if [ $change_path -eq 1 ]
|
if [ $change_path -eq 1 ]
|
||||||
|
@ -66,6 +67,7 @@ then
|
||||||
ynh_replace_string "return \([[:digit:]]\{3\}\) $old_path" "return \1 $new_path" "$nginx_conf_path"
|
ynh_replace_string "return \([[:digit:]]\{3\}\) $old_path" "return \1 $new_path" "$nginx_conf_path"
|
||||||
# Calculate and store the nginx config file checksum
|
# Calculate and store the nginx config file checksum
|
||||||
ynh_store_file_checksum "$nginx_conf_path"
|
ynh_store_file_checksum "$nginx_conf_path"
|
||||||
|
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
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,10 +80,7 @@ then
|
||||||
# Store file checksum for the new config file location
|
# Store file checksum for the new config file location
|
||||||
ynh_store_file_checksum "/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
ynh_store_file_checksum "/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||||
fi
|
fi
|
||||||
# Change the path in the config.local.php
|
|
||||||
ynh_replace_string --match_string="//const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$new_path/config.local.php"
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC FINALISATION
|
# GENERIC FINALISATION
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Reference in a new issue