diff options
author | Adam Jacob <adam@hjksolutions.com> | 2009-02-13 11:57:50 -0800 |
---|---|---|
committer | Adam Jacob <adam@hjksolutions.com> | 2009-02-13 11:57:50 -0800 |
commit | c7d29d03362c9df52906e5af91d2008694af0d96 (patch) | |
tree | f264d62b5af516f3aa88f56008cf25fb773c92fe /chef/bin | |
parent | d752cdbdfa1238d4377283d1984fb132f8a9a9bb (diff) | |
parent | b0afa1d2eb95891b5ac37f0ffd5fb147a812c19c (diff) | |
download | chef-c7d29d03362c9df52906e5af91d2008694af0d96.tar.gz |
Merge branch 'fujin/chef-91'
Diffstat (limited to 'chef/bin')
-rwxr-xr-x | chef/bin/chef-client | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chef/bin/chef-client b/chef/bin/chef-client index a37794e440..479a592125 100755 --- a/chef/bin/chef-client +++ b/chef/bin/chef-client @@ -70,6 +70,13 @@ opts = OptionParser.new do |opts| end opts.parse!(ARGV) +trap("INT") { Chef.fatal!("SIGINT received, stopping", 2) } +trap("HUP") { + Chef::Log.info("SIGHUP received, reloading configuration") + Chef::Config.from_file(config[:config_file]) + Chef::Config.configure { |c| c.merge!(config) } +} + unless File.exists?(config[:config_file]) and File.readable?(config[:config_file]) Chef.fatal!("I cannot find or read the config file: #{config[:config_file]}", 1) end |