WIP bitcoind config

This commit is contained in:
2020-01-21 15:18:10 -05:00
parent 47105b2a1c
commit 09527e693b
5 changed files with 151 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
#
# Cookbook:: kosmos-bitcoin
# Recipe:: default
# Recipe:: snapd
#
# The MIT License (MIT)
#
@@ -29,10 +29,28 @@ package 'snapd'
snap_package 'bitcoin-core'
bitcoin_user = node['bitcoin']['username']
bitcoin_user = node['bitcoin']['username']
bitcoin_group = node['bitcoin']['usergroup']
bitcoin_datadir = node['bitcoin']['datadir']
# TODO create bitcoin datadir
# TODO create bitcoin.conf in datadir
directory bitcoin_datadir do
owner bitcoin_user
group bitcoin_group
mode '0755'
recursive true
action :create
end
template "#{bitcoin_datadir}/bitcoin.conf" do
owner bitcoin_user
group bitcoin_group
variables conf: node['bitcoin']['conf'],
mainnet_conf: node['bitcoin']['mainnet_conf'],
testnet_conf: node['bitcoin']['testnet_conf'],
regtest_conf: node['bitcoin']['regtest_conf']
action :create
# notifies :reload, "service[bitcoin]", :delayed
end
mount "/home/#{bitcoin_user}/snap/bitcoin-core/common/.bitcoin" do
device node['bitcoin']['data_dir']