Update IPFS to the latest release
Also fix the ipfs config
This commit is contained in:
@@ -8,8 +8,7 @@ end
|
||||
action :create do
|
||||
include_recipe "ipfs"
|
||||
|
||||
json_value = JSON.generate(value)
|
||||
execute "ipfs config --json #{key} #{json_value}" do
|
||||
execute "ipfs config --json #{key} '#{value}'" do
|
||||
environment "IPFS_PATH" => "/home/ipfs/.ipfs"
|
||||
user "ipfs"
|
||||
not_if do
|
||||
@@ -20,9 +19,9 @@ action :create do
|
||||
env: { "IPFS_PATH" => "/home/ipfs/.ipfs" })
|
||||
cmd.run_command
|
||||
begin
|
||||
JSON.parse(cmd.stdout) == value
|
||||
JSON.parse(cmd.stdout) == JSON.parse(value)
|
||||
rescue JSON::ParserError
|
||||
cmd.stdout.include?(value)
|
||||
cmd.stdout.include?("#{value}")
|
||||
end
|
||||
end
|
||||
notifies :restart, "service[ipfs]", :delayed
|
||||
|
||||
Reference in New Issue
Block a user