Cookbooks
apache2
documentation
Resource Apache2 Service

apache2_service

Back to resource list

Actions

  • :start
  • :stop
  • :restart
  • :reload
  • :enable
  • :disable

Properties

NameTypeDefaultDescription
service_nameStringapache_platform_service_nameService name to perform actions for
delay_startTrue, FalsetrueDelay service start until end of run

Examples

apache2_service 'default' do
  action [:enable, :start]
end

Example - using notifications

apache2_install 'default' do
  notifies :restart, 'apache2_service[default]'
end
 
apache2_default_site 'default' do
  notifies :reload, 'apache2_service[default]'
end
 
apache2_service 'default' do
  action [:enable, :start]
end