(For Witnesses) Instant price-feed script

in #steem8 years ago

As part of being a witness, you're expected to run a price feed, to allow the network to convert SBD to USD (via STEEM).

Unfortunately, most of them are a bit of a pain to install.

Well. Not anymore. I've taken @jesta's fork of @clayop's python price feed, and wrapped it with a shell script that can deal with setting it up, configuring, as well as start/stop/status

It's open source, released under the GNU GPL v3. You can view the code here: https://gist.github.com/Someguy123/100dbc0e40d343886e2aa014317f586f/

It works on both Linux (debian-based, e.g. ubuntu), and OSX (requires homebrew).

Here's how to use it:

wget https://gist.githubusercontent.com/Someguy123/100dbc0e40d343886e2aa014317f586f/raw/pricefeed-tool.sh -O price.sh
chmod +x price.sh
./price.sh install
./price.sh start

Need to change the username or key?

./price.sh config

Here's an example, on a complete fresh DigitalOcean 512mb server to show how easy it is:

root@feedtest:~# wget https://gist.githubusercontent.com/Someguy123/100dbc0e40d343886e2aa014317f586f/raw/pricefeed-tool.sh -O price.sh

2016-09-14 21:06:10 (42.7 MB/s) - ‘price.sh’ saved [4643/4643]

root@feedtest:~# chmod +x price.sh
root@feedtest:~# ./price.sh install
Installing Python3, git, and Python3-PIP...
- - - - - - - - - - - - - - - - - - - - - -

Extracting templates from packages: 100%
- - - - - - - - - - - - - - - - - - - - - -

Updating PIP to avoid problems...
- - - - - - - - - - - - - - - - - - - - - -

Cloning @jesta's Steem Feed...
- - - - - - - - - - - - - - - - - - - - - -

Installing dependencies...
- - - - - - - - - - - - - - - - - - - - - -

Automatically configure the price feed? (Y/n)
Creating config file...
If you make a mistake, just press CTRL-C to exit without saving.
Your STEEM username  (no @ sign): someguy123
Your active private key (begins with 5): 5.........
- - - - - - - - - - - - - - - - - - - - - -
Successfully saved config
- - - - - - - - - - - - - - - - - - - - - -

Price feed has been installed. Start with './price.sh restart'

root@feedtest:~# ./price.sh restart
Killing any existing price feed
Loading environment settings
Starting steemfeed in screen 'pricefeed'
Pricefeed started! Check on it with 'screen -x pricefeed'
Problems? Check steemfeed/error.log
root@feedtest:~# ./price.sh status
The price feed is running
root@feedtest:~#

Did you see that? That's right. 3 commands and it's up.


Do you like what I'm doing for STEEM/Steemit?

Vote for me to be a witness - every vote counts.

Don't forget to follow me for more like this.

Sort:  

Bookmarked for future reference and use. Don't forget about the tmux guys! Thanks!

TMUX is great too, but it's not the nicest when you want to script it.

Screen has the wonderful -dmS which pretty much lets you daemonize anything you want, instantly. Plus screen is available on practically every OS

tmux is very scriptable too.. you can also start a process without attaching
so i've a question- after posting a witness application thread, how do you publish it as the url under the witness?

The same way you broadcast the intent.

update_witness "yourname" "https://steemit.com/your-witness-post" "SIGNINGPUBLICKKEY" {"account_creation_fee":"10.000 STEEM","maximum_block_size":65536,"sbd_interest_rate":1000} true

Thanks, @someguy123. You are a cool guy.

I don't know what this means, but I do appreciate what you're doing. :)

Thanks! Bookmark cashtags: $b.witness $b.pricefeed $b.dev

Trying this out!!.. looks amazing so far, thanks for all your script they have been ever so useful for me!

Coin Marketplace

STEEM 0.16
TRX 0.14
JST 0.028
BTC 59117.70
ETH 2597.31
USDT 1.00
SBD 2.43