blob: 0cdaa1e6ac58f5049c69f9cb7f80a02e2b972b54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/sbin/runscript
depend() {
need net
}
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
./startup.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
}
|