diff --git a/scripts/change_url b/scripts/change_url index e37ee48..70bb37f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -56,8 +56,6 @@ nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf # Change the path in the nginx config file if [ $change_path -eq 1 ] then -# 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" fi # Make a backup of the original nginx config file if modified ynh_backup_if_checksum_is_different "$nginx_conf_path" @@ -80,7 +78,8 @@ then # Store file checksum for the new config file location ynh_store_file_checksum "/etc/nginx/conf.d/$new_domain.d/$app.conf" 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 diff --git a/scripts/install b/scripts/install index 8919644..7327a06 100644 --- a/scripts/install +++ b/scripts/install @@ -88,7 +88,7 @@ cp -a $final_path/config.dist.php $final_path/config.local.php # ynh_replace_string --match_string="const ROOT = __DIR__;" --replace_string="const ROOT = /var/www/garradin/;" --target_file="$final_path/config.local.php" ynh_replace_string --match_string="const PREFER_HTTPS = false;" --replace_string="const PREFER_HTTPS = true;" --target_file="$final_path/config.local.php" -ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '/$path_url/';" --target_file="$final_path/config.local.php" +ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" #================================================= # Files owned by user app