diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-24 23:01:25 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-24 23:01:25 +0000 |
commit | 772c7c87ffab1b7a70413fa6bbd20df45490dbf2 (patch) | |
tree | b86f177abe4dc6526d1ac0a0c537ee9637c784ad /ext/module_puppet | |
parent | 503ad38194b0064de240a1ae0f043b8fb6d40903 (diff) | |
download | puppet-772c7c87ffab1b7a70413fa6bbd20df45490dbf2.tar.gz puppet-772c7c87ffab1b7a70413fa6bbd20df45490dbf2.tar.xz puppet-772c7c87ffab1b7a70413fa6bbd20df45490dbf2.zip |
Adding TERM to the signals being trapped
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@945 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'ext/module_puppet')
-rwxr-xr-x | ext/module_puppet | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/module_puppet b/ext/module_puppet index 542b93207..489cc37ba 100755 --- a/ext/module_puppet +++ b/ext/module_puppet @@ -132,6 +132,20 @@ if Puppet[:config] and File.exists? Puppet[:config] Puppet.config.parse(Puppet[:config]) end +client = nil +server = nil + +[:INT, :TERM].each do |signal| + trap(signal) do + Puppet.notice "Caught #{signal}; shutting down" + [client, server].each { |obj| + if obj + obj.shutdown + end + } + end +end + Puppet.genconfig Puppet.genmanifest |