Class: Vines::Services::Command::Stop
- Inherits:
-
Object
- Object
- Vines::Services::Command::Stop
- Defined in:
- lib/vines/services/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/services/command/stop.rb', line 7 def run(opts) raise 'vines-services [--pid FILE] stop' unless opts[:args].size == 0 daemon = Vines::Daemon.new(:pid => opts[:pid]) if daemon.running? daemon.stop puts 'The vines service has been shutdown' else puts 'The vines service is not running' end end |