Class: WPAR::Wrapper::StopWpar

Inherits:
Object
  • Object
show all
Defined in:
lib/wpars/wrapper/stopwpar.rb

Class Method Summary collapse

Class Method Details

.stop(options = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/wpars/wrapper/stopwpar.rb', line 7

def self.stop(options = {})
  unless options[:force].nil?
    cmd = "#{options[:command]} #{Constants::STOPWPAR} -F #{options[:name]}"
  else
    cmd = "#{options[:command]} #{Constants::STOPWPAR} #{options[:name]}"
  end

  puts "debug: #{cmd}" unless options[:debug].nil?
  External.cmd(cmd: cmd, live_stream: options[:live_stream])
end