Method: Flydata::Command::Sender#kill_all

Defined in:
lib/flydata/command/sender.rb

#kill_all(options = {}) ⇒ Object



144
145
146
147
148
149
150
151
# File 'lib/flydata/command/sender.rb', line 144

def kill_all(options = {})
  if Kernel.system("ps x | grep 'flydata' | grep -v grep | grep fluentd | awk '{print \"kill -9 \" $1}' | sh")
    log_info_stdout("Done.") unless options[:quiet]
    return true
  else
    raise 'Could not terminate FlyData process.'
  end
end