availableDiskSize=$(df -P ~/ ...
This commit is contained in:
parent
e2967096ab
commit
9a287869b9
|
@ -6,8 +6,6 @@ MY_PATH="`dirname \"$0\"`" # relative
|
||||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||||
|
|
||||||
## Config
|
## Config
|
||||||
availableDiskSize=$(df -P ~/.ipfs | awk 'NR>1{sum+=$4}END{print sum}')
|
|
||||||
diskSize="$((availableDiskSize / 2))"
|
|
||||||
templates="$MY_PATH/templates/ipfs"
|
templates="$MY_PATH/templates/ipfs"
|
||||||
|
|
||||||
if [ "$EUID" -eq 0 ]
|
if [ "$EUID" -eq 0 ]
|
||||||
|
@ -62,6 +60,8 @@ ipfs_install() {
|
||||||
# PUBSUB
|
# PUBSUB
|
||||||
ipfs config Pubsub.Router gossipsub
|
ipfs config Pubsub.Router gossipsub
|
||||||
# MAXSTORAGE
|
# MAXSTORAGE
|
||||||
|
availableDiskSize=$(df -P ~/ | awk 'NR>1{sum+=$4}END{print sum}')
|
||||||
|
diskSize="$((availableDiskSize / 2))"
|
||||||
ipfs config Datastore.StorageMax $diskSize
|
ipfs config Datastore.StorageMax $diskSize
|
||||||
## PORT FORWARD (SSH)
|
## PORT FORWARD (SSH)
|
||||||
ipfs config --json Experimental.Libp2pStreamMounting true
|
ipfs config --json Experimental.Libp2pStreamMounting true
|
||||||
|
|
Loading…
Reference in New Issue