Created
November 29, 2012 02:04
-
-
Save trobrock/4166298 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/.gitignore b/.gitignore | |
index fc5b76d..702ef6c 100644 | |
--- a/.gitignore | |
+++ b/.gitignore | |
@@ -2,3 +2,4 @@ | |
.cache | |
.kitchen | |
bin | |
+*.sw* | |
diff --git a/attributes/source.rb b/attributes/source.rb | |
index 284eb30..0cf8d5b 100644 | |
--- a/attributes/source.rb | |
+++ b/attributes/source.rb | |
@@ -23,9 +23,11 @@ include_attribute 'nginx' | |
default['nginx']['source']['prefix'] = "/opt/nginx-#{node['nginx']['version']}" | |
default['nginx']['source']['conf_path'] = "#{node['nginx']['dir']}/nginx.conf" | |
+default['nginx']['source']['sbin_path'] = "#{node['nginx']['source']['prefix']}/sbin/nginx" | |
default['nginx']['source']['default_configure_flags'] = [ | |
"--prefix=#{node['nginx']['source']['prefix']}", | |
- "--conf-path=#{node['nginx']['dir']}/nginx.conf" | |
+ "--conf-path=#{node['nginx']['dir']}/nginx.conf", | |
+ "--sbin-path=#{node['nginx']['source']['sbin_path']}" | |
] | |
default['nginx']['configure_flags'] = Array.new | |
diff --git a/recipes/source.rb b/recipes/source.rb | |
index 3293f5e..f66ca31 100644 | |
--- a/recipes/source.rb | |
+++ b/recipes/source.rb | |
@@ -37,7 +37,7 @@ unless(node['nginx']['source']['default_configure_flags']) | |
"--conf-path=#{node['nginx']['dir']}/nginx.conf" | |
] | |
end | |
-node.set['nginx']['binary'] = "#{node['nginx']['source']['prefix']}/sbin/nginx" | |
+node.set['nginx']['binary'] = node['nginx']['source']['sbin_path'] | |
node.set['nginx']['daemon_disable'] = true | |
include_recipe "nginx::ohai_plugin" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment