rhq-project/rhq — pull request #149 by veithen (2014-11-17 22:55:22+00:00)
Title: Ensure that the server and agent scripts propagate SIGTERM in foreground...

... mode

Supervisord requires that programs (1) don't daemonize themselves and
(2) respond to SIGTERM by properly shutting down. Requirement (1) is satisfied
provided one uses the following commands:
- rhq-server/rhq-storage/bin/cassandra -f
- rhq-server/bin/internal/rhq-server.sh console
- rhq-agent/bin/rhq-agent.sh -d
This patch modifies rhq-server.sh and rhq-agent.sh so that they also satisfy
requirement (2). Note that Cassandra already satisfies that requirement because
the script uses exec to launch the JVM.

With this change, RHQ can be properly configured to run under Supervisord, e.g.
in a Docker container.