From 89fa3ede9eff9c027131bf7eab20addc849840dc Mon Sep 17 00:00:00 2001 From: Greg Karekinian Date: Wed, 25 Jun 2025 09:51:35 +0200 Subject: [PATCH] Remove the condition on the postgresql Also move back the environment variable definitions to the hash --- site-cookbooks/kosmos-bitcoin/recipes/btcpay.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/site-cookbooks/kosmos-bitcoin/recipes/btcpay.rb b/site-cookbooks/kosmos-bitcoin/recipes/btcpay.rb index 2b69d76..69974a6 100644 --- a/site-cookbooks/kosmos-bitcoin/recipes/btcpay.rb +++ b/site-cookbooks/kosmos-bitcoin/recipes/btcpay.rb @@ -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" end -systemd_unit_env = "'DOTNET_CLI_TELEMETRY_OPTOUT=1'" -systemd_unit_env << " 'BTCPAY_EXPLORERPOSTGRES=#{nbxpg_connect}'" if defined?(nbxpg_connect) +systemd_unit_env = "'BTCPAY_EXPLORERPOSTGRES=#{nbxpg_connect}' 'DOTNET_CLI_TELEMETRY_OPTOUT=1'" systemd_unit 'btcpayserver.service' do content({ Unit: { @@ -89,7 +88,7 @@ systemd_unit 'btcpayserver.service' do Group: node['bitcoin']['usergroup'], Type: 'simple', 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']}", PIDFile: '/run/btcpayserver/btcpayserver.pid', Restart: 'on-failure',