Skip to content

Commit

Permalink
Merge pull request #13 from redBorder/bug/#16282_add_file_country
Browse files Browse the repository at this point in the history
Add country.dat file
  • Loading branch information
manegron authored Apr 9, 2024
2 parents b306a01 + ee0cee6 commit e36b21f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Binary file added resources/files/default/country.dat
Binary file not shown.
9 changes: 8 additions & 1 deletion resources/recipes/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@
mode "0400"
end

cookbook_file "/usr/share/GeoIP/country.dat" do
source "country.dat"
owner "root"
group "root"
mode "0644"
end

if sensor_id>0
if node.name.start_with?"rbipscp-"
node.run_list(["role[ipscp-sensor]", "role[rBsensor-#{sensor_id}]", "role[ipscp-sensor]"])
Expand Down Expand Up @@ -353,7 +360,7 @@
if !node["redborder"]["ipsrules"].nil? and !node["redborder"]["cloud"].nil?
node["redborder"]["ipsrules"].to_hash.each do |groupid, ipsrules|
if node["redborder"]["ipsrules"][groupid]["command"] and !node["redborder"]["ipsrules"][groupid]["command"].empty? and node["redborder"]["ipsrules"][groupid]["timestamp"].to_i > 0 and node["redborder"]["ipsrules"][groupid]["timestamp_last"].to_i < node["redborder"]["ipsrules"][groupid]["timestamp"].to_i and node["redborder"]["ipsrules"][groupid]["uuid"] and !node["redborder"]["ipsrules"][groupid]["uuid"].empty?
command=node["redborder"]["ipsrules"][groupid]["command"].to_s.gsub!(/^sudo /, "").gsub(/;/, " ")
command=node["redborder"]["ipsrules"][groupid]["command"].to_s.gsub(/^sudo /, "").gsub(/;/, " ")
if command.start_with?'/bin/env BOOTUP=none /usr/lib/redborder/bin/rb_get_sensor_rules.sh '
execute "download_rules_#{groupid}" do
command "/usr/lib/redborder/scripts/rb_get_sensor_rules_cloud.rb -c '#{command}' -u #{node["redborder"]["ipsrules"][groupid]["uuid"].to_s}"
Expand Down

0 comments on commit e36b21f

Please sign in to comment.