Class: Vines::Agent::Command::Stop
- Inherits:
-
Object
- Object
- Vines::Agent::Command::Stop
- Defined in:
- lib/vines/agent/command/stop.rb
Instance Method Summary collapse
Instance Method Details
#run(opts) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/vines/agent/command/stop.rb', line 7 def run(opts) raise 'vines-agent [--pid FILE] stop' unless opts[:args].size == 0 daemon = Vines::Daemon.new(:pid => opts[:pid]) if daemon.running? daemon.stop puts 'The vines agent has been shutdown' else puts 'The vines agent is not running' end end |