summaryrefslogtreecommitdiffstats
path: root/bin/puppetmasterd
diff options
context:
space:
mode:
Diffstat (limited to 'bin/puppetmasterd')
-rwxr-xr-xbin/puppetmasterd10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/puppetmasterd b/bin/puppetmasterd
index 3f235b179..3ae74f73b 100755
--- a/bin/puppetmasterd
+++ b/bin/puppetmasterd
@@ -221,9 +221,13 @@ if args[:Daemonize]
server.daemonize
end
-trap(:INT) {
- server.shutdown
-}
+
+[:INT, :TERM].each do |signal|
+ trap(signal) do
+ Puppet.notice "Caught #{signal}; shutting down"
+ server.shutdown
+ end
+end
Puppet.notice "Starting Puppet server version %s" % [Puppet.version]