openmicroscopy/openmicroscopy — pull request #2824 by bpindelski (2014-07-17 10:12:18+00:00)
Title: Use "pid" instead of "state" for checking service. (rebased onto develop)

This is the same as gh-2815 but rebased onto develop.

----

This fixes the situation where "state" would return "0"
as the return code for a started and stopped service (Ice 3.4).
"pid" returns "1" if the service isn't running.

To test, check on Ice 3.4 and Ice 3.5:
- start the server, import an image,
- try ``bin/omero admin reindex —reset 0`` - you should get a message about Indexer-0 still running,
- run ``bin/omero admin reindex --prepare`` - this will stop the indexing service,
- try again ``bin/omero admin reindex —reset 0`` - this time it should start reindexing.