Skip to content

Instantly share code, notes, and snippets.

@StephanieSunshine
Created November 14, 2018 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StephanieSunshine/cf2bb5a05e6e58fa5a6c06213ecda6f5 to your computer and use it in GitHub Desktop.
Save StephanieSunshine/cf2bb5a05e6e58fa5a6c06213ecda6f5 to your computer and use it in GitHub Desktop.
tlosfs-watcher.sh
#!/usr/bin/env bash
node_id=`ipfs id | grep \"ID\" | awk '{ print $2; }' | tr -d \" | tr -d \,`
ipfs pubsub sub $node_id | xargs -n 1 -P 0 ipfs pin add &
ipfs pubsub sub unpin | xargs -n 1 -P 0 ipfs pin rm &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment