diff options
Diffstat (limited to 'dev-java/openjms-bin/files/rc')
-rw-r--r-- | dev-java/openjms-bin/files/rc | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-java/openjms-bin/files/rc b/dev-java/openjms-bin/files/rc new file mode 100644 index 000000000000..a608be2bf053 --- /dev/null +++ b/dev-java/openjms-bin/files/rc @@ -0,0 +1,35 @@ +#!/sbin/runscript +#This was heavily copied from the generic-init.d script which comes with the +#binary version of firebird-ss + +depend() { + need net +} + +check_config() { + [ -n "${JMSDIR}" ] || 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 +} |