summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rwxr-xr-xlib/puppet/daemon.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/puppet/daemon.rb b/lib/puppet/daemon.rb
index 0f538fe44..b6dbf2665 100755
--- a/lib/puppet/daemon.rb
+++ b/lib/puppet/daemon.rb
@@ -1,6 +1,7 @@
require 'puppet'
require 'puppet/util/pidlock'
require 'puppet/external/event-loop'
+require 'puppet/application'
# A module that handles operations common to all daemons. This is included
# into the Server and Client base classes.
@@ -83,11 +84,8 @@ class Puppet::Daemon
end
def restart
- if agent and agent.running?
- agent.configure_delayed_restart
- else
- reexec
- end
+ Puppet::Application.restart!
+ reexec unless agent and agent.running?
end
def reopen_logs
@@ -107,9 +105,9 @@ class Puppet::Daemon
# Stop everything
def stop(args = {:exit => true})
- server.stop if server
+ Puppet::Application.stop!
- agent.stop if agent
+ server.stop if server
remove_pidfile()