This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
sdbs_selfhosting [2020/07/06 14:57] sdbs |
sdbs_selfhosting [2020/10/19 14:13] sdbs add autopin |
||
---|---|---|---|
Line 17: | Line 17: | ||
+ | ===== CHAOS ===== | ||
+ | ==== IPFS ==== | ||
+ | |||
+ | The script for autopinning: | ||
+ | |||
+ | < | ||
+ | set -ex | ||
+ | cd | ||
+ | pwd | ||
+ | mkdir -p ipfs | ||
+ | cd ipfs | ||
+ | |||
+ | echo ' | ||
+ | #!/bin/bash | ||
+ | DIR=" | ||
+ | |||
+ | cd " | ||
+ | |||
+ | for url in " | ||
+ | echo " | ||
+ | for cid in $(curl -s $url|sort -R);do | ||
+ | ipfs get " | ||
+ | done | ||
+ | done | ||
+ | ' > update_pins.sh | ||
+ | chmod +x update_pins.sh | ||
+ | |||
+ | echo "30 */6 * * * $(whoami) ipfs name publish --key=gunk Qmb6WJzMereTNCMh1drjepq3wEn9r6HkBZKadc7CFwf98V" | ||
+ | |||
+ | set +x | ||
+ | echo " | ||
+ | </ | ||
+ | |||
+ | Copy and paste this into some file, then run it with '' |