Auto-unlock LND wallet/node
The latest release added a new config option for auto-unlocking the wallet/node using a password file. This changeset adds support for just that to the lnd recipe, so that nobody has to manually unlock it after reboots or service restarts.
这个提交包含在:
父节点
a65065c793
当前提交
2ca576468e
@ -45,8 +45,9 @@ node.default['lnd']['public_ip'] = '148.251.237.111'
|
|||||||
node.default['lnd']['public_port'] = '9735'
|
node.default['lnd']['public_port'] = '9735'
|
||||||
node.default['lnd']['port'] = '9736'
|
node.default['lnd']['port'] = '9736'
|
||||||
node.default['lnd']['minchansize'] = '1000000'
|
node.default['lnd']['minchansize'] = '1000000'
|
||||||
node.default['lnd']['basefee'] = '500'
|
node.default['lnd']['basefee'] = '1000'
|
||||||
node.default['lnd']['feerate'] = '1'
|
node.default['lnd']['feerate'] = '50'
|
||||||
|
node.default['lnd']['auto_unlock'] = true # requires credentials/lnd data bag item
|
||||||
|
|
||||||
node.default['rtl']['repo'] = 'https://github.com/Ride-The-Lightning/RTL.git'
|
node.default['rtl']['repo'] = 'https://github.com/Ride-The-Lightning/RTL.git'
|
||||||
node.default['rtl']['revision'] = 'v0.11.0'
|
node.default['rtl']['revision'] = 'v0.11.0'
|
||||||
|
|||||||
@ -36,6 +36,17 @@ directory lnd_dir do
|
|||||||
action :create
|
action :create
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if node['lnd']['auto_unlock']
|
||||||
|
lnd_credentials = Chef::EncryptedDataBagItem.load('credentials', 'lnd')
|
||||||
|
|
||||||
|
file "#{lnd_dir}/.unlock.txt" do
|
||||||
|
content lnd_credentials['password']
|
||||||
|
mode '0600'
|
||||||
|
owner bitcoin_user
|
||||||
|
group bitcoin_group
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
template "#{lnd_dir}/lnd.conf" do
|
template "#{lnd_dir}/lnd.conf" do
|
||||||
source "lnd.conf.erb"
|
source "lnd.conf.erb"
|
||||||
owner bitcoin_user
|
owner bitcoin_user
|
||||||
@ -49,6 +60,8 @@ template "#{lnd_dir}/lnd.conf" do
|
|||||||
lnd_minchansize: node['lnd']['minchansize'],
|
lnd_minchansize: node['lnd']['minchansize'],
|
||||||
lnd_basefee: node['lnd']['basefee'],
|
lnd_basefee: node['lnd']['basefee'],
|
||||||
lnd_feerate: node['lnd']['feerate'],
|
lnd_feerate: node['lnd']['feerate'],
|
||||||
|
lnd_dir: lnd_dir,
|
||||||
|
auto_unlock: node['lnd']['auto_unlock'],
|
||||||
bitcoin_datadir: node['bitcoin']['datadir'],
|
bitcoin_datadir: node['bitcoin']['datadir'],
|
||||||
bitcoin_rpc_user: node['bitcoin']['conf']['rpcuser'],
|
bitcoin_rpc_user: node['bitcoin']['conf']['rpcuser'],
|
||||||
bitcoin_rpc_password: bitcoin_credentials["rpcpassword"],
|
bitcoin_rpc_password: bitcoin_credentials["rpcpassword"],
|
||||||
|
|||||||
@ -6,6 +6,7 @@ alias=<%= @lnd_alias %>
|
|||||||
color=<%= @lnd_color %>
|
color=<%= @lnd_color %>
|
||||||
maxpendingchannels=2
|
maxpendingchannels=2
|
||||||
minchansize=<%= @lnd_minchansize %>
|
minchansize=<%= @lnd_minchansize %>
|
||||||
|
<% if @auto_unlock %>wallet-unlock-password-file=<%= @lnd_dir %>/.unlock.txt<% end %>
|
||||||
|
|
||||||
[autopilot]
|
[autopilot]
|
||||||
autopilot.active=0
|
autopilot.active=0
|
||||||
|
|||||||
正在加载...
x
在新工单中引用
屏蔽一个用户