ipfs: support pre-0.38 Provide config
This commit is contained in:
parent
870863790a
commit
46011690f3
|
|
@ -11,8 +11,11 @@ ipfs config --json Gateway.NoFetch true
|
|||
# DHT client mode with accelerated providing
|
||||
ipfs config --json Routing '{ "Type": "dhtclient", "AcceleratedDHTClient": true }'
|
||||
|
||||
# Reprovider config was renamed to Provide in go-ipfs 0.38+
|
||||
ipfs config --json Provide '{ "Interval": "22h", "Strategy": "pinned+mfs", "Enabled": true }'
|
||||
# Reprovider config name changed in go-ipfs 0.38+. Try the new key first, then fall back.
|
||||
PROVIDER_CFG='{ "Interval": "22h", "Strategy": "pinned+mfs", "Enabled": true }'
|
||||
if ! ipfs config --json Provide "$PROVIDER_CFG" 2>/dev/null; then
|
||||
ipfs config --json Reprovider "$PROVIDER_CFG"
|
||||
fi
|
||||
|
||||
# Keep connection manager within reasonable bounds
|
||||
ipfs config --json Swarm.ConnMgr '{ "Type": "basic", "LowWater": 50, "HighWater": 200, "GracePeriod": "20s" }'
|
||||
|
|
|
|||
Loading…
Reference in New Issue