I have ruby daemons running. Once in a while we'll accidentally start up a second instance of it, which causes race conditions.
Can I use Monit to detect if multiple instances of 'my_ruby_daemon' is running? And if so kill the extra instance?
I don't know if you can do this with
The Right Solution is to have your daemon create and check a lock (PID files work great for this -- if
It helps if you put the lock file somewhere that gets cleared on reboot (