inspec/lib/resources/apache.rb

31 lines
711 B
Ruby
Raw Normal View History

2015-10-26 21:41:02 +00:00
# encoding: utf-8
# copyright: 2015, Vulcano Security GmbH
# author: Christoph Hartmann
# author: Dominik Richter
# license: All rights reserved
module Inspec::Resources
class Apache < Inspec.resource(1)
name 'apache'
2015-10-26 21:41:02 +00:00
attr_reader :service, :conf_dir, :conf_path, :user
def initialize
if inspec.os.debian?
@service = 'apache2'
@conf_dir = '/etc/apache2/'
@conf_path = File.join @conf_dir, 'apache2.conf'
@user = 'www-data'
else
@service = 'httpd'
@conf_dir = '/etc/httpd/'
@conf_path = File.join @conf_dir, '/conf/httpd.conf'
@user = 'apache'
end
2015-10-26 21:41:02 +00:00
end
def to_s
'Apache Environment'
end
2015-10-26 21:41:02 +00:00
end
end