diff options
author | Brandon Low <lostlogic@gentoo.org> | 2004-01-16 03:41:22 +0000 |
---|---|---|
committer | Brandon Low <lostlogic@gentoo.org> | 2004-01-16 03:41:22 +0000 |
commit | 5bd0ba05d3d9ce0b561c0f5f52e3dbea8835dfef (patch) | |
tree | 9fd293ada0bad60050bfe993931edc00e26a3033 /dev-java/openjms-bin/files/rc2 | |
parent | Version bump (diff) | |
download | historical-5bd0ba05d3d9ce0b561c0f5f52e3dbea8835dfef.tar.gz historical-5bd0ba05d3d9ce0b561c0f5f52e3dbea8835dfef.tar.bz2 historical-5bd0ba05d3d9ce0b561c0f5f52e3dbea8835dfef.zip |
Make the RC script work :)
Diffstat (limited to 'dev-java/openjms-bin/files/rc2')
-rw-r--r-- | dev-java/openjms-bin/files/rc2 | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/dev-java/openjms-bin/files/rc2 b/dev-java/openjms-bin/files/rc2 new file mode 100644 index 000000000000..47a2ab350705 --- /dev/null +++ b/dev-java/openjms-bin/files/rc2 @@ -0,0 +1,41 @@ +#!/sbin/runscript + +depend() { + need net firebird xinetd +} + +check_config() { + [ -n "${JMSDIR}" ] || return 1 + if [ -z "${JAVA_HOME}" ]; then + JAVA_HOME="$(/usr/bin/java-config --jre-home)" + if [ -z "${JAVA_HOME}" ]; then + JAVA_HOME="$(/usr/bin/java-config --jdk-home)" + fi + fi + export JAVA_HOME + [ -n "${JAVA_HOME}" ] || return 1 +} + +# See how we were called. +start() { + check_config || return 1 + ebegin "Starting JMS server" + cd ${JMSDIR}/bin + ./startjms.sh > /var/log/openjms.log 2>&1 & + sleep 5 + if ps ax|grep '[o]rg\.exolab\.jms\.server\.JmsServer' > /dev/null; then + eend 0 + else + eend 1 + fi +} +stop() { + check_config || return 1 + ebegin "Stopping JMS server" + cd ${JMSDIR}/bin + if ./shutdown.sh 2>&1 |grep '[Ff]ailed' > /dev/null; then + eend 1 + else + eend 0 + fi +} |