Skip to content

Instantly share code, notes, and snippets.

@leafsummer
Last active May 17, 2022 11:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save leafsummer/a39df2843c8f2f342a4616f3cca0fb20 to your computer and use it in GitHub Desktop.
Save leafsummer/a39df2843c8f2f342a4616f3cca0fb20 to your computer and use it in GitHub Desktop.
zeronet auto make seed

Become a Seeder: If you have a spare node (like a Raspberry PI with external HDD), you can setup a ZeroNet node here, which can automatically download and seen each new site published here.

Script to download new sites:


ZERO_DIR=~/ZeroNet-master
ZERO_HOST=127.0.0.1
APP_ID=1LtvsjbtQ2tY7SCtCZzC4KhErqEK3bXD4n

NEW_SITES=`sqlite3 $ZERO_DIR/data/$APP_ID/data/zerosites.db "select address from sites order by added desc limit 5;"`
for SITE in $NEW_SITES; do
    echo Check site $SITE
    curl --silent http://$ZERO_HOST:43110/$SITE > /dev/null
done

Cron setup:

*/5 * * * * /home/zeronode/autoseed.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment