gchef/nginx-cookbook — pull request #10 by mlen (2012-09-06 09:49:04+00:00)
Title: Config files must exist before starting the service

Running "nginx::source" recipe resulted in error (running chef 10.12.0) because `/etc/init.d/nginx` haven't been created yet:

[Thu, 06 Sep 2012 05:43:58 -0400] INFO: Processing service[nginx] action enable (nginx::source line 36)
[Thu, 06 Sep 2012 05:43:58 -0400] ERROR: service[nginx] (nginx::source line 36) has had an error
[Thu, 06 Sep 2012 05:43:58 -0400] ERROR: service[nginx] (/var/chef/cookbooks/nginx/recipes/source.rb:36:in `from_file') had an error:
service[nginx] (nginx::source line 36) had an error: Errno::ENOENT: No such file or directory - /etc/init.d/nginx status

This pull request fixes this issue by creating configuration files first and then starting the service.