In Files

Parent

Methods

SignalHelper

Public Class Methods

send() click to toggle source

send signal

# File lib/helper.rb, line 24
def self.send
  pid_file = nil

  conf_file  = File.join(ADMIN_PANEL_ROOT,'..','..','conf','server_internal_config.yml')

  config = YAML.load_file(conf_file)
  pid_file = config["webroar_analyzer_script"]["pid_file"] if config["webroar_analyzer_script"] and config["webroar_analyzer_script"]["pid_file"]
  unless pid_file
    Rails.logger.error("Either Webroar Analyzer is not started or 'webroar_analyzer.pid' not found")
    return
  end
  pid = File.read(pid_file).chomp.to_i rescue nil
  Process.kill("USR1", pid)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.