Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix/#18863/Remove default license of GeoIP and add a Setting to manualy install the license #7

Merged
merged 7 commits into from
Oct 19, 2024
Merged
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
2 changes: 2 additions & 0 deletions resources/providers/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
action :add do
user_id = new_resource.user_id
license_key = new_resource.license_key

begin
%w(GeoIP GeoIP-GeoLite-data GeoIP-GeoLite-data-extra geoipupdate geoipupdate-cron).each do |pack|
dnf_package pack do
Expand All @@ -16,6 +17,7 @@
command 'geoipupdate'
ignore_failure true
action :nothing
not_if { user_id.nil? || user_id.empty? || license_key.nil? || license_key.empty? }
end

template '/etc/GeoIP.conf' do
Expand Down
6 changes: 2 additions & 4 deletions resources/resources/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
actions :add, :remove
default_action :add

attribute :user_id, kind_of: Integer, default: 712324

# TODO: Get rid of this hardcode license
attribute :license_key, kind_of: String, default: 'WCr9s2QoEPWz'
attribute :user_id, kind_of: String
attribute :license_key, kind_of: String
Loading