Sha256: 53b36ed2543ece649ab40fa57a56e82a7ab094f477cbb14541b241af3a93f5b3

Contents?: true

Size: 500 Bytes

Versions: 5

Compression:

Stored size: 500 Bytes

Contents

#
# If the root passwort is empty, the "-p" option should NOT be 
# passed to the mysql command.
#

execute "mysql-install-wp-privileges" do
  # original:
  #command "/usr/bin/mysql -u root -p\"#{node['mysql']['server_root_password']}\" < #{node['mysql']['conf_dir']}/wp-grants.sql"
  # fixed:
  command "/usr/bin/mysql -u root #{node['mysql']['server_root_password'].empty? ? '' : '-p' }\"#{node['mysql']['server_root_password']}\" < #{node['mysql']['conf_dir']}/wp-grants.sql"
  action :nothing
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cloud-toaster-1.1.6 chef/cookbooks/toaster/recipes/post__wordpress__default.rb
cloud-toaster-1.1.5 chef/cookbooks/toaster/recipes/post__wordpress__default.rb
cloud-toaster-1.1.4 chef/cookbooks/toaster/recipes/post__wordpress__default.rb
cloud-toaster-1.1.3 chef/cookbooks/toaster/recipes/post__wordpress__default.rb
cloud-toaster-1.1.2 chef/cookbooks/toaster/recipes/post__wordpress__default.rb