Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/rghost/gs_alone.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ def run
unless File.exists?(RGhost::Config::GS[:path].to_s)
RGhost::Config.config_platform
end
r=system(RGhost::Config::GS[:path]+cmd)

full_command = "#{RGhost::Config::GS[:path]}#{cmd}"
timeout = RGhost::Config::GS[:timeout].to_i
if timeout > 0
full_command = "timeout #{timeout}s #{full_command}"
end
r=system(full_command)

puts RGhost::Config::GS[:path]+cmd if @debug
puts full_command if @debug
#puts r
r
end
Expand Down
1 change: 1 addition & 0 deletions lib/rghost/ruby_ghost_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ module RGhost::Config
:plugin => nil,
:path => nil,
:tmpdir => ENV["TMP"] || ENV["TMPDIR"] || ENV["TEMPDIR"] || ENV["TEMP"] || "/tmp",
:timeout => ENV['GS_TIMEOUT'] || 3000,
:pslibdir => File.join( File.dirname(__FILE__),"ps"),
:extensions => [],
:preload => [],
Expand Down