module IpWrangler::Exec

Public Instance Methods

execute_command(command) click to toggle source
# File lib/ip_wrangler/exec.rb, line 7
def execute_command(command)
  output = `#{command}`
  puts "Execute: #{command} => output: #{output}, result: #{$?.exitstatus}"
  output
end
execute_iptables_command(command) click to toggle source
# File lib/ip_wrangler/exec.rb, line 13
def execute_iptables_command(command)
  execute_command("#{$iptables_bin_path} #{command}")
end