From f3d8422f1c3d8c1e8cf3cc04d9982b8cfb8878c4 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Mon, 11 Jul 2022 11:06:38 +0300 Subject: [PATCH 1/1] wordpress: Use DOS line ending. Disable WP auto updater --- cookbooks/wordpress/resources/site.rb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/cookbooks/wordpress/resources/site.rb b/cookbooks/wordpress/resources/site.rb index 1d419c14e..c3f16ddca 100644 --- a/cookbooks/wordpress/resources/site.rb +++ b/cookbooks/wordpress/resources/site.rb @@ -92,14 +92,16 @@ action :create do line.gsub!(/('LOGGED_IN_SALT', *)'put your unique phrase here'/, "\\1'#{logged_in_salt}'") line.gsub!(/('NONCE_SALT', *)'put your unique phrase here'/, "\\1'#{nonce_salt}'") - if line =~ /define\('WP_DEBUG'/ - line += "\n" - line += "/**\n" - line += " * Don't allow file editing.\n" - line += " */\n" - line += "define('DISALLOW_FILE_EDIT', true);\n" - line += "define('FORCE_SSL_LOGIN', true);\n" - line += "define('FORCE_SSL_ADMIN', true);\n" + if line =~ /Add any custom values between this line/ + line += "\r\n" + line += "/**\r\n" + line += " * Don't allow file editing.\r\n" + line += " */\r\n" + line += "define( 'DISALLOW_FILE_EDIT', true);\r\n" + line += "define( 'DISALLOW_FILE_MODS', true);\r\n" + line += "define( 'AUTOMATIC_UPDATER_DISABLED', true);\r\n" + line += "define( 'FORCE_SSL_LOGIN', true);\r\n" + line += "define( 'FORCE_SSL_ADMIN', true);\r\n" end line -- 2.39.5