Skip to content

Commit

Permalink
Check for pid_file
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkrouper committed Dec 12, 2024
1 parent 44c651b commit a4c95c4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
8 changes: 0 additions & 8 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,6 @@ def db_init
mysql_install_db_cmd
end

def db_initialized?
if v80plus
::File.exist? "#{data_dir}/mysql.ibd"
else
::File.exist? "#{data_dir}/mysql/user.frm"
end
end

def mysql_install_db_bin
return "#{base_dir}/scripts/mysql_install_db" if platform_family?('omnios')
return "#{prefix_dir}/bin/mysql_install_db" if platform_family?('smartos')
Expand Down
3 changes: 1 addition & 2 deletions libraries/mysql_service_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ def initialize_database
bash "#{new_resource.name} initial records" do
code init_records_script
umask '022'
returns [0, 1, 2] # facepalm
not_if { db_initialized? }
not_if { ::File.exist?(new_resource.pid_file) }
action :run
end
end
Expand Down

0 comments on commit a4c95c4

Please sign in to comment.