reduice water levels for swarm

This commit is contained in:
fred 2021-08-11 05:27:37 +02:00
parent 8333454ed9
commit 0462b11d42
1 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,9 @@ IPFSNODEID=$(ipfs --timeout=10s id -f='<id>\n')
## CONTROL IPFS IS RUNNING OR RESTART
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
if [[ ! ${YOU} ]]; then
# reduice water levels for swarm
ipfs config --json Swarm.ConnMgr.LowWater 200
ipfs config --json Swarm.ConnMgr.HighWater 400
[[ "${USER}" == "xbian" ]] && sudo service ipfs restart || sudo systemctl restart ipfs
echo "ERROR! ipfs daemon was not running. RELAUNCHING."
exit 1