Method: Flydata::Command::Sender#stop
- Defined in:
- lib/flydata/command/sender.rb
#stop(options = {}) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/flydata/command/sender.rb', line 41 def stop( = {}) unless process_exist? say("Process doesn't exist.") unless [:quiet] return true end say('Stopping sender process.') unless [:quiet] if Kernel.system("kill `cat #{FLYDATA_HOME}/flydata.pid`") and wait_until_client_stop() say('Done.') unless [:quiet] return true end raise 'Something has gone wrong..' end |