Added iptables counter update script

This commit is contained in:
Priit Tark 2015-05-31 23:28:15 +03:00
parent 80e4fe0529
commit bb6186c33b
6 changed files with 47 additions and 23 deletions

View file

@ -285,6 +285,7 @@ class EppController < ApplicationController
# rubocop: enable Metrics/CyclomaticComplexity
def iptables_counter_update
`ENV['iptables_counter_update_command']` if ENV['iptables_counter_update_command'].present?
return if ENV['iptables_counter_enabled'].blank? && ENV['iptables_counter_enabled'] != 'true'
Iptable.counter_update(current_user.registrar_code, request.remote_ip)
end
end