Skip to content

mariodian/counterparty-dispenser-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About The Project

Monitor Counterparty network for new asset dispensers.

Get a notificaion via Pushover (paid service) or email (need to be configured separately to send emails remotely).

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

In order to easily parse json responses from counterparty API, we need to install jq first.

  • Install on Debian based distros:
    sudo apt update && sudo apt install jq
  • Install on MacOS using brew:
    brew install jq

Installation

If you have jq installed follow these steps.

  1. Clone the repository:
    git clone https://github.com/mariodian/counterparty-dispenser-watcher.git
  2. Go to the repo directory:
    cd counterparty-dispenser-watcher
  3. Copy the content of .env to .env.local and edit according to your needs using your preferred text editor:
    cp .env .env.local
  4. Edit assets.txt according to your needs. Each asset names goes on a new line.
  5. If you want to be notified about new dispensers via email outside of your local machine, you need to setup postfix. Unfortunatelly, that's beyond the scope of this tutorial. I highly recommend using Pushover instead.

Usage

Run the script manually

To check if the script works run the following:

./watcher.sh

Run the script automatically via cron

You will most likely want to check for new dispensers automatically. You can do so via cron.

  1. Edit crontab:
    crontab -e
  2. Add the following line to run every 10 minutes (edit the path according to your setup):
    */10 * * * * /home/<username>/<path to counterparty-dispenser-watcher dir>/watcher.sh > /dev/null 2>&1
  3. Make sure the line was added correctly:
    crontab -l

Donation

If you find this script useful, feel free to donate either bitcoin or counterparty assets to bc1qfzfjr4e4wsm97erhdj9lnfaf6jeh4m0vunmsv0.

Thank you!

About

Monitoring Counterparty dispensers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages