speedtest-domains/gen-rsc.rb
Eliezer Croitoru b627bd3a2c 3
2024-05-22 09:36:57 +03:00

20 lines
379 B
Ruby
Executable File

#!/usr/bin/env ruby
domainsFilename = ARGV[0]
addressListName = ARGV[1]
if addressListName.nil? or domainsFilename.nil?
STDERR.puts("Missing cli arguments")
exit 1
end
domains = File.open(domainsFilename).readlines
domains.each do |l|
l = l.chomp.strip
next if l.empty?
next if l[0] == "#"
puts "/ip/firewall/address-list/add list=#{addressListName} address=#{l}"
end