lib/shared/pe_status_check.rb
def service_file_exist?(configfile)
    configdir = if Facter.value(:os)['family'].eql?('RedHat') || Facter.value(:os)['family'].eql?('Suse')
                  '/etc/sysconfig'
                else
                  '/etc/default'
                end
    File.exist?("#{configdir}/#{configfile}")
  end
# Checks if passed service file exists in correct directory for the OS
# @return [Boolean] true if file exists
# @param configfile [String] The name of the pe service to be tested
Checks if passed service file exists in correct directory for the OS
Checks if passed service file exists in correct directory for the OS
def service_file_exist?(configfile)
    configdir = if Facter.value(:os)['family'].eql?('RedHat') || Facter.value(:os)['family'].eql?('Suse')
                  '/etc/sysconfig'
                else
                  '/etc/default'
                end
    File.exist?("#{configdir}/#{configfile}")
  end
def service_file_exist? ( configfile ) configdir = if Facter . value ( :os ) [ 'family' ] . eql? ( 'RedHat' ) || Facter . value ( :os ) [ 'family' ] . eql? ( 'Suse' ) '/etc/sysconfig' else '/etc/default' end File . exist? ( "#{configdir}/#{configfile}" ) end
Checks if passed service file exists in correct directory for the OS
Checks if passed service file exists in correct directory for the OS
true if file exists
true if file exists
Boolean
configfile
The name of the pe service to be tested
The name of the pe service to be tested