Class: Nonnative::Command

Inherits:
Service
  • Object
show all
Defined in:
lib/nonnative/command.rb

Instance Method Summary collapse

Methods inherited from Service

#initialize, #name

Constructor Details

This class inherits a constructor from Nonnative::Service

Instance Method Details

#startObject



5
6
7
8
9
10
11
12
# File 'lib/nonnative/command.rb', line 5

def start
  unless command_exists?
    @pid = command_spawn
    wait_start
  end

  pid
end

#stopObject



14
15
16
17
18
19
20
21
# File 'lib/nonnative/command.rb', line 14

def stop
  if command_exists?
    command_kill
    wait_stop
  end

  pid
end