Created
November 13, 2012 11:05
-
-
Save maxmanders/4065239 to your computer and use it in GitHub Desktop.
Delay start of NSSM created service until the end of a Chef run.
This file contains 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
nssm_service "chef-client" do | |
application "C:/opscode/chef/embedded/bin/ruby.exe" | |
options "C:/opscode/chef/bin/chef-client -C C:/chef/client.rb -i 1800 -s 120" | |
end | |
service "chef-client" do | |
action :nothing | |
only_if { WMI::Win32_Service.find(:all).collect{|s| s.name}.include?("chef-client") } | |
end | |
template "C:\\opscode\\chef\\service-trigger.txt" do | |
source "service-trigger.txt.erb" | |
notifies :restart, "service[chef-client]" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment