Add configuration for ipfs and restart the daemon when changing it
This commit is contained in:
parent
f4e288645d
commit
b82ad70313
|
@ -38,6 +38,21 @@ if platform?('ubuntu') && node[:platform_version].to_f >= 15.04
|
|||
provider Chef::Provider::Service::Systemd
|
||||
end
|
||||
|
||||
# Configure ipfs
|
||||
execute "ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/9090" do
|
||||
environment "IPFS_PATH" => "/home/ipfs/.ipfs"
|
||||
user "ipfs"
|
||||
not_if "ipfs config Addresses.Gateway | grep /ip4/127.0.0.1/tcp/9090"
|
||||
notifies :restart, "service[ipfs]", :delayed
|
||||
end
|
||||
|
||||
execute "ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '[\"kredits.kosmos.org\"]'" do
|
||||
environment "IPFS_PATH" => "/home/ipfs/.ipfs"
|
||||
user "ipfs"
|
||||
not_if "ipfs config API.HTTPHeaders.Access-Control-Allow-Origin | grep kredits.kosmos.org"
|
||||
notifies :restart, "service[ipfs]", :delayed
|
||||
end
|
||||
|
||||
execute "systemctl daemon-reload" do
|
||||
command "systemctl daemon-reload"
|
||||
action :nothing
|
||||
|
|
Loading…
Reference in New Issue