Class: Apache
- Inherits:
-
Object
- Object
- Apache
- Defined in:
- lib/resources/apache.rb
Overview
copyright: 2015, Vulcano Security GmbH author: Christoph Hartmann author: Dominik Richter license: All rights reserved
Instance Attribute Summary collapse
-
#conf_dir ⇒ Object
readonly
Returns the value of attribute conf_dir.
-
#conf_path ⇒ Object
readonly
Returns the value of attribute conf_path.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize ⇒ Apache
constructor
A new instance of Apache.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Apache
Returns a new instance of Apache.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/resources/apache.rb', line 11 def initialize case inspec.os[:family] when 'ubuntu', '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 end |
Instance Attribute Details
#conf_dir ⇒ Object (readonly)
Returns the value of attribute conf_dir.
10 11 12 |
# File 'lib/resources/apache.rb', line 10 def conf_dir @conf_dir end |
#conf_path ⇒ Object (readonly)
Returns the value of attribute conf_path.
10 11 12 |
# File 'lib/resources/apache.rb', line 10 def conf_path @conf_path end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
10 11 12 |
# File 'lib/resources/apache.rb', line 10 def service @service end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
10 11 12 |
# File 'lib/resources/apache.rb', line 10 def user @user end |
Instance Method Details
#to_s ⇒ Object
26 27 28 |
# File 'lib/resources/apache.rb', line 26 def to_s 'Apache Environment' end |