From: Grant Slater Date: Mon, 11 Jul 2022 08:06:38 +0000 (+0300) Subject: wordpress: Use DOS line ending. Disable WP auto updater X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/f3d8422f1c3d8c1e8cf3cc04d9982b8cfb8878c4 wordpress: Use DOS line ending. Disable WP auto updater --- 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