WIP bitcoind config
This commit is contained in:
@@ -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']
|
||||
Reference in New Issue
Block a user