From 44f9bccfb7a23bd5ea91f3ed9f88ee216f468a71 Mon Sep 17 00:00:00 2001 From: Jamil Bou Kheir Date: Thu, 3 Feb 2022 16:36:39 -0800 Subject: [PATCH] use telemetry id file --- .../firezone/files/default/ctl-commands/create_admin.rb | 4 ++-- .../firezone/files/default/ctl-commands/reconfigure.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/omnibus/cookbooks/firezone/files/default/ctl-commands/create_admin.rb b/omnibus/cookbooks/firezone/files/default/ctl-commands/create_admin.rb index 543d645ff..33a261140 100644 --- a/omnibus/cookbooks/firezone/files/default/ctl-commands/create_admin.rb +++ b/omnibus/cookbooks/firezone/files/default/ctl-commands/create_admin.rb @@ -10,13 +10,13 @@ Resets the password for admin with email specified by default['firezone']['admin DESC def capture - fqdn = Mixlib::ShellOut.new("hostname -f").run_command.stdout + telemetry_id = File.read("/opt/firezone/sv/phoenix/env/TELEMETRY_ID") uri = URI("https://telemetry.firez.one/capture/") data = { api_key: "phc_ubuPhiqqjMdedpmbWpG2Ak3axqv5eMVhFDNBaXl9UZK", event: "firezone-ctl create-or-reset-admin", properties: { - distinct_id: fqdn + distinct_id: telemetry_id } } unless File.exist?("#{base_path}/.disable-telemetry") || ENV["TELEMETRY_ENABLED"] == "false" diff --git a/omnibus/cookbooks/firezone/files/default/ctl-commands/reconfigure.rb b/omnibus/cookbooks/firezone/files/default/ctl-commands/reconfigure.rb index e41855631..75a932a1a 100644 --- a/omnibus/cookbooks/firezone/files/default/ctl-commands/reconfigure.rb +++ b/omnibus/cookbooks/firezone/files/default/ctl-commands/reconfigure.rb @@ -6,13 +6,13 @@ require 'net/http' require 'json' def capture - fqdn = Mixlib::ShellOut.new("hostname -f").run_command.stdout + telemetry_id = File.read("/opt/firezone/sv/phoenix/env/TELEMETRY_ID") uri = URI("https://telemetry.firez.one/capture/") data = { api_key: "phc_ubuPhiqqjMdedpmbWpG2Ak3axqv5eMVhFDNBaXl9UZK", event: "firezone-ctl reconfigure", properties: { - distinct_id: fqdn + distinct_id: telemetry_id } }