Sha256: 90221325a4f9d2872115509709019e5b1ade0a263238e4038af11a68f7df2f33

Contents?: true

Size: 829 Bytes

Versions: 38

Compression:

Stored size: 829 Bytes

Contents

if abiquo_installed?

def mysqld_running?
  return true if `service mysqld status`.strip.chomp != 'mysqld is stopped'
end

def mysqld_installed?
  RPMUtils.rpm_installed?('mysql-server')
end

def abiquo_schema_present?
  File.directory? '/var/lib/mysql/kinton'
end

def abiquo_schema_premium?
  File.exist? '/var/lib/mysql/kinton/virtualimage_conversions.frm'
end


puts "MySQL Installed:".bold.ljust(40) + (mysqld_installed? ? 'Yes'.green.bold : 'No')
if mysqld_installed?
  puts "MySQL Running:".bold.ljust(40) + (mysqld_running? ? 'Yes'.green.bold : 'No')
end

if mysqld_installed?
  puts "Abiquo Schema:".bold.ljust(40) + (abiquo_schema_present? ? 'Present'.green.bold : 'Not Found')
  if abiquo_schema_present?
    puts "Abiquo Schema Type:".bold.ljust(40) + (abiquo_schema_premium? ? 'Premium':'Community')
  end
end

end

Version data entries

38 entries across 24 versions & 1 rubygems

Version Path
abiquo-etk-0.6.4 lib/checks/1.7.6/mysql.rb
abiquo-etk-0.6.4 lib/checks/1.7.5/mysql.rb
abiquo-etk-0.6.4 lib/checks/1.8.0/mysql.rb
abiquo-etk-0.6.3 lib/checks/1.8.0/mysql.rb
abiquo-etk-0.6.3 lib/checks/1.7.6/mysql.rb
abiquo-etk-0.6.3 lib/checks/1.7.5/mysql.rb
abiquo-etk-0.6.2 lib/checks/1.7.5/mysql.rb
abiquo-etk-0.6.2 lib/checks/1.8.0/mysql.rb
abiquo-etk-0.6.2 lib/checks/1.7.6/mysql.rb
abiquo-etk-0.6.1 lib/checks/1.7.6/mysql.rb
abiquo-etk-0.6.1 lib/checks/1.8.0/mysql.rb
abiquo-etk-0.6.1 lib/checks/1.7.5/mysql.rb
abiquo-etk-0.6.0 lib/checks/1.7.6/mysql.rb
abiquo-etk-0.6.0 lib/checks/1.8.0/mysql.rb
abiquo-etk-0.6.0 lib/checks/1.7.5/mysql.rb
abiquo-etk-0.5.9 lib/checks/1.7.5/mysql.rb
abiquo-etk-0.5.9 lib/checks/1.7.6/mysql.rb
abiquo-etk-0.5.9 lib/checks/1.8.0/mysql.rb
abiquo-etk-0.5.8 lib/checks/1.8.0/mysql.rb
abiquo-etk-0.5.8 lib/checks/1.7.5/mysql.rb