4 Facter.add("onion_tor_service_hostname") do
7 Dir['/var/lib/tor/onion/*/hostname'].each do |p|
9 service = File.basename(dir)
10 hostname = IO.read(p).chomp
11 services[service] = hostname
18 Facter.add("onion_balance_service_hostname") do
21 Dir['/etc/onionbalance/private_keys/*.key'].each do |p|
22 service = File.basename(p, '.key')
24 services[service] = IO.popen(['/usr/local/bin/tor-onion-name', p]).read.chomp