0

I'm hoping someone out there is used to monit and can help me.

Im running a home data server, with Ubuntu 13.10.

I have CGminer setup to start when the PC boots, from a bash script of my own creation. It contains a few tweaks and setting that need running before it gets going.

But if for some reason my interweb goes down...cgminer will close after a small amount of time. Now, if im asleep, and it closes. That valuable mining time, and a waste of the electric. So I'm looking into monit as a way of fixing that.

Im hoping to be able to have monit (or something similar, doesnt have to be monit) Start CGMiner from my script, check every so often that CGminer is still running, and if not, restart it from my script.

I just cant get my head around the config file for monit...Help would be awesome

7hr08ik
  • 109
  • 2
  • 9

1 Answers1

0

Yes, you can achieve that with monit. You only need that your start script writes pid into pidfile:

 check process xyz with pidfile /var/run/xyz.pid
       start = "/bin/xyz start"
       stop = "/bin/xyz stop"
Raul Andres
  • 3,766
  • 15
  • 24