Hi kigster. You aren't doing anything wrong - simple-daemon just
doesn't have logic built in to ensure that duplicate daemons aren't
started. At the moment, that logic is just assumed to be handled at a
higher level. For example, I usually use monit to manage the stopping
and starting of my daemon processes. Though this isn't perfect...
That said, I think this would be a great addition to simple-daemon.
Check out Lockfile (
http://raa.ruby-lang.org/project/lockfile/) for
one tool that could take care of this for you. And if you get this
working within simple-daemon, send me a patch and I'll add it to the
gem. Otherwise, I'll see about adding it (though I probably won't have
a chance for a few weeks...)
Jon