Opt-out of dotnet telemetry for btcpay #599

Merged
greg merged 5 commits from feature/441-optout_dotnet_telemetry into master 2025-06-25 10:01:59 +00:00
Showing only changes of commit 89fa3ede9e - Show all commits

View File

@@ -74,8 +74,7 @@ if node["nbxplorer"]["postgres"]
nbxpg_connect = "User ID=#{nbxpg_user};Password=#{nbxplorer_credentials['postgresql_password']};Database=#{nbxpg_database};Host=pg.kosmos.local;Port=5432;Application Name=btcpayserver;MaxPoolSize=80" nbxpg_connect = "User ID=#{nbxpg_user};Password=#{nbxplorer_credentials['postgresql_password']};Database=#{nbxpg_database};Host=pg.kosmos.local;Port=5432;Application Name=btcpayserver;MaxPoolSize=80"
end end
systemd_unit_env = "'DOTNET_CLI_TELEMETRY_OPTOUT=1'" systemd_unit_env = "'BTCPAY_EXPLORERPOSTGRES=#{nbxpg_connect}' 'DOTNET_CLI_TELEMETRY_OPTOUT=1'"
systemd_unit_env << " 'BTCPAY_EXPLORERPOSTGRES=#{nbxpg_connect}'" if defined?(nbxpg_connect)
systemd_unit 'btcpayserver.service' do systemd_unit 'btcpayserver.service' do
content({ content({
Unit: { Unit: {
@@ -89,7 +88,7 @@ systemd_unit 'btcpayserver.service' do
Group: node['bitcoin']['usergroup'], Group: node['bitcoin']['usergroup'],
Type: 'simple', Type: 'simple',
WorkingDirectory: node['btcpay']['source_dir'], WorkingDirectory: node['btcpay']['source_dir'],
Environment: systemd_unit_env, Environment: "'BTCPAY_EXPLORERPOSTGRES=#{nbxpg_connect}' 'DOTNET_CLI_TELEMETRY_OPTOUT=1'",
ExecStart: "#{node['btcpay']['source_dir']}/run.sh --conf=#{node['btcpay']['config_path']}", ExecStart: "#{node['btcpay']['source_dir']}/run.sh --conf=#{node['btcpay']['config_path']}",
PIDFile: '/run/btcpayserver/btcpayserver.pid', PIDFile: '/run/btcpayserver/btcpayserver.pid',
Restart: 'on-failure', Restart: 'on-failure',