Module: Bluepill::Application::ServerMethods

Defined in:
lib/bluepill/application/server.rb

Instance Method Summary collapse

Instance Method Details

#restartObject



12
13
14
15
# File 'lib/bluepill/application/server.rb', line 12

def restart
  self.socket = Bluepill::Socket.new(name, base_dir).client
  socket.send("restart\n", 0)
end

#statusObject



6
7
8
9
10
# File 'lib/bluepill/application/server.rb', line 6

def status
  self.processes.collect do |process|
    "#{process.name} #{process.state}"
  end.join("\n")
end

#stopObject



17
18
19
20
# File 'lib/bluepill/application/server.rb', line 17

def stop
  self.socket = Bluepill::Socket.new(name, base_dir).client
  socket.send("stop\n", 0)
end