Cookbooks
nginx
documentation
Nginx Service

nginx_service

Back to resource list

Actions

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

Properties

NameTypeDefaultDescription
service_nameStringnginxThe service name to perform actions upon
config_testTrue, FalsetruePerform a configuration file test before performing service action

Usage

Example

nginx_service 'nginx' do
  action :enable
  delayed_action :start
end

Example - Skip configuration test

nginx_service 'nginx' do
  config_test false
 
  action :enable
  delayed_action :start
end