summaryrefslogtreecommitdiffstats
path: root/bin/puppetd
diff options
context:
space:
mode:
Diffstat (limited to 'bin/puppetd')
-rwxr-xr-xbin/puppetd10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/puppetd b/bin/puppetd
index fb8759057..2fabccd69 100755
--- a/bin/puppetd
+++ b/bin/puppetd
@@ -278,10 +278,12 @@ end
# now set up the network client with the certs, now that we have them
client.setcerts
-trap(:INT) {
- Puppet.notice "Caught INT; shutting down"
- client.shutdown
-}
+[:INT, :TERM].each do |signal|
+ trap(signal) do
+ Puppet.notice "Caught #{signal}; shutting down"
+ client.shutdown
+ end
+end
if onetime
begin