summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-servers/resin/files/3.0.22/resin.init')
-rw-r--r--www-servers/resin/files/3.0.22/resin.init10
1 files changed, 7 insertions, 3 deletions
diff --git a/www-servers/resin/files/3.0.22/resin.init b/www-servers/resin/files/3.0.22/resin.init
index 6a66fb947c5a..075eb2e40e5b 100644
--- a/www-servers/resin/files/3.0.22/resin.init
+++ b/www-servers/resin/files/3.0.22/resin.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/resin/files/3.0.22/resin.init,v 1.1 2006/11/19 12:23:22 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/resin/files/3.0.22/resin.init,v 1.2 2007/01/08 22:44:55 nelchael Exp $
depend() {
need net
@@ -9,14 +9,18 @@ depend() {
}
start() {
- export JAVA_HOME=$(java-config --select-vm=${GENTOO_VM} -O)
+ JAVA_HOME=$(java-config -O)
+ [[ -n "${GENTOO_VM}" ]] && JAVA_HOME=$(java-config --select-vm="${GENTOO_VM}" -O)
+ export JAVA_HOME
ebegin "Starting Resin"
su - resin -c "${RESIN_HOME}/bin/httpd.sh ${JAVA_OPTS} -pid-dir /var/run/resin/ -java_home ${JAVA_HOME} -resin_home ${RESIN_HOME} -cp ${CLASSPATH} -stdout ${RESIN_OUT} -stderr ${RESIN_ERR} ${RESIN_START}"
eend $?
}
stop() {
- export JAVA_HOME=$(java-config --select-vm=${GENTOO_VM} -O)
+ JAVA_HOME=$(java-config -O)
+ [[ -n "${GENTOO_VM}" ]] && JAVA_HOME=$(java-config --select-vm="${GENTOO_VM}" -O)
+ export JAVA_HOME
ebegin "Stopping Resin"
su - resin -c "${RESIN_HOME}/bin/httpd.sh ${JAVA_OPTS} -pid-dir /var/run/resin/ ${RESIN_STOP}"
eend $?