Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of the webserver_service #243

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions attributes/php_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
default['newrelic']['php_agent']['startup_mode'] = nil
default['newrelic']['php_agent']['web_server']['service_name'] = nil
default['newrelic']['php_agent']['web_server']['service_action'] = nil
default['newrelic']['php_agent']['web_server']['service_provider'] = nil
default['newrelic']['php_agent']['web_server']['service_supports'] = {:status => true, :start => true, :stop => true, :restart => true, :reload => true}
default['newrelic']['php_agent']['config_file'] = nil
default['newrelic']['php_agent']['config_file_to_be_deleted'] = nil
default['newrelic']['php_agent']['execute_php5enmod'] = nil
Expand Down
5 changes: 4 additions & 1 deletion providers/agent_php.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ def newrelic_daemon

def webserver_service
service new_resource.service_name do
supports :status => true, :start => true, :stop => true, :restart => true, :reload => true
supports new_resource.service_supports
if new_resource.service_provider
provider eval(new_resource.service_provider)
end
end
end

Expand Down
2 changes: 2 additions & 0 deletions resources/agent_php.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
attribute :config_file_to_be_deleted, :kind_of => String, :default => nil
attribute :service_name, :kind_of => String, :default => nil
attribute :service_action, :kind_of => String, :default => 'restart'
attribute :service_provider, :kind_of => String, :default => nil
attribute :service_supports, :kind_of => Hash, :default => {:status => true, :start => true, :stop => true, :restart => true, :reload => true}
attribute :execute_php5enmod, :kind_of => [TrueClass, FalseClass], :default => false
attribute :cookbook_ini, :kind_of => String, :default => 'newrelic'
attribute :source_ini, :kind_of => String, :default => 'agent/php/newrelic.ini.erb'
Expand Down