2 Commits

Author SHA1 Message Date
Râu Cao
ea635a52e9 Formatting 2022-12-26 11:14:40 +07:00
Râu Cao
90e17b0abc Rename bitcoind recipe
Was still using a name from when the cookbook didn't set up anything
else
2022-12-25 16:28:14 +07:00
3 changed files with 9 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
name "bitcoind"
run_list %w(
kosmos-bitcoin::source
kosmos-bitcoin::bitcoind
)

View File

@@ -1,6 +1,6 @@
#
# Cookbook:: kosmos-bitcoin
# Recipe:: source
# Recipe:: bitcoind
#
build_essential

View File

@@ -5,11 +5,12 @@
include_recipe 'git'
include_recipe 'kosmos-bitcoin::golang'
include_recipe 'kosmos-bitcoin::user'
bitcoin_user = node['bitcoin']['username']
bitcoin_group = node['bitcoin']['usergroup']
lnd_dir = node['lnd']['lnd_dir']
lncli_bin = "/opt/go/bin/lncli"
lncli_bin = '/opt/go/bin/lncli'
source_dir = node['lndhub-go']['source_dir']
macaroon_path = "#{lnd_dir}/data/lndhub.macaroon"
credentials = data_bag_item('credentials', 'lndhub-go')
@@ -26,10 +27,10 @@ git source_dir do
end
bash 'compile_lndhub-go' do
cwd node['lndhub-go']['source_dir']
code "make"
cwd source_dir
code 'make'
action :nothing
notifies :restart, "systemd_unit[lndhub-go.service]", :delayed
notifies :restart, 'service[lndhub-go]', :delayed
end
bash 'bake_lndhub_macaroon' do
@@ -94,13 +95,13 @@ systemd_unit 'lndhub-go.service' do
action [:create, :enable, :start]
end
service "lndhub-go" do
service 'lndhub-go' do
action :nothing
end
firewall_rule 'lndhub-go' do
port node['lndhub-go']['port']
source "10.1.1.0/24"
source '10.1.1.0/24'
protocol :tcp
command :allow
end