This script was initially a solo miner, but I have converted it into an unbreakable node.
The auto restarter detects for an unresponsive daemon mainly by checking the size of the debug log.
It is also designed to backup the wallet twice in UNIXTIME-backup.wallet.dat in the root folder.
If the server is detected unresponsive on several occasions (4 crashes within the 20 second checks), the script will automatically clear the block database. If any more (10 crashes in 20 second checks), the entire .memorycoin and memorycoin/ folder will be deleted (wallet.dat is always preserved) and then completely rebuilt from source.
You may play around with the variables in the beginning of the file on line 2 and on line 454 of the script. I suggest you just keep them at default values.
Tips @ MBCtHCXoKthgjdau4zpny9nCyNcJ4jTBG8
Install:
cd ~;wget https://dl.dropboxusercontent.com/u/50880632/mmc-churn-node.sh;chmod +x mmc-churn-node.sh; ./mmc-churn-node.sh
BROWSE THE SOURCE:
https://dl.dropboxusercontent.com/u/50880632/mmc-churn-node.sh
There may be an issue if you lost the session and then the script would then enter an infinite loop. It would also take 100% CPU. I set a trap to prevent the user from accidentally closing the script. All you have to do is close the script with 'kill -9 mmc-churn-node.sh'; The other option is to use a screen and then detach/attach it.
This script runs on my churn node at 69.197.161.42:1968, also listed on
http://www.mmc-chain.com/?engine=nodeexplorer