How to auto-restart a ChainCoin (CHC) masternode upon VPS reboot (Linux)

in #masternode7 years ago (edited)

If you're running a masternode on a VPS, from time to time, your service provider might reboot your server. When this happens, you'll have to restart your masternode in order to continue receiving payments. A friend of mine was on vacation when his service provider rebooted his server, and he missed out on several days of payments because he wasn't in a place to manually restart the masternode.

So, how do you restart the masternode automatically?

You can use cron to do this.

When logged in under your user account, type:

crontab -e

You may be prompted for which text editor to use. Select your preference.

At the end of the file, enter:

@reboot /usr/local/bin/chaincoind -daemon >/dev/null 2>&1

Save and close the file.

To check your entry, you can type:

crontab -l

To test it, reboot your server with:

sudo reboot

When it comes back online, wait a few minutes, and then check to see that the masternode is running.

You can enter:

ps ax | grep chaincoin

You should see /usr/local/bin/chaincoind -daemon in the list of running processes.

To further check it, run:

chaincoin-cli getinfo

If you see an info block, all is well!

Now you can rest easy, knowing your masternode will restart anytime the server is rebooted.

Sort:  

THANK YOU, THANK YOU, THANK YOU!!!! Worked perfect..Have I thanked you yet? THANK YOU!!!!

Thanks again;)

Welcome to Steemit :)
I follow u, follow me back if u want lot of fun and amazing picture every day.

Dude, I cannot tell you how long I've been looking for a good way to do this! Thank you very much for the information! :D

Coin Marketplace

STEEM 0.20
TRX 0.14
JST 0.029
BTC 68029.30
ETH 3272.63
USDT 1.00
SBD 2.64