class Vines::Command::Stop

Public Instance Methods

run(opts) click to toggle source
# File lib/vines/command/stop.rb, line 6
def run(opts)
  raise 'vines [--pid FILE] stop' unless opts[:args].size == 0
  daemon = Daemon.new(:pid => opts[:pid])
  if daemon.running?
    daemon.stop
    puts 'Vines has been shutdown'
  else
    puts 'Vines is not running'
  end
end