Fixed the sed commands

main
Anthony 2025-08-09 01:16:49 +08:00
parent f9d144e6f7
commit 385cbd41b4
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ if [[ -f "$CONFIG_FILE" && -w "$CONFIG_FILE" ]]; then
INSERT_BLOCK+="define( 'WP_SITEURL', '${TARGET_URL}' );\n"
fi
if [[ $needs_http_host -eq 1 ]]; then
INSERT_BLOCK+="if ( defined( 'WP_CLI' ) && WP_CLI && ! isset( $_SERVER['HTTP_HOST'] ) ) { $_SERVER['HTTP_HOST'] = '${HOST_ONLY}'; }\n"
INSERT_BLOCK+="if ( defined( 'WP_CLI' ) && WP_CLI && ! isset( \$_SERVER['HTTP_HOST'] ) ) { \$_SERVER['HTTP_HOST'] = '${HOST_ONLY}'; }\n"
fi
awk -v block="$INSERT_BLOCK" '