Class: Fission::Fusion

Inherits:
Object show all
Defined in:
lib/fission.old/fusion.rb

Class Method Summary collapse

Class Method Details

.running?Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
10
11
12
13
14
# File 'lib/fission.old/fusion.rb', line 4

def self.running?
  command = "ps -ef | grep -v grep | grep -c "
  command << "#{Fission.config.attributes['gui_bin'].gsub(' ', '\ ')} 2>&1"
  output = `#{command}`

  response = Fission::Response.new :code => 0

  output.strip.to_i > 0 ? response.data = true : response.data = false

  response
end