Remove the condition on the postgresql
Also move back the environment variable definitions to the hash
This commit is contained in:
parent
efb032fffa
commit
89fa3ede9e
@ -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',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user