Class: Vines::Command::Stop
- Inherits:
-
Object
- Object
- Vines::Command::Stop
- Defined in:
- lib/vines/command/stop.rb
Instance Method Summary collapse
Instance Method Details
#run(opts) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# 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 |