diff options
Diffstat (limited to 'system/apache-tomcat/rc.tomcat')
-rw-r--r-- | system/apache-tomcat/rc.tomcat | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/system/apache-tomcat/rc.tomcat b/system/apache-tomcat/rc.tomcat index 3e2c307bf7851..e3630784a1a55 100644 --- a/system/apache-tomcat/rc.tomcat +++ b/system/apache-tomcat/rc.tomcat @@ -9,10 +9,14 @@ # Load environment variables . /etc/profile.d/apache-tomcat.sh -if [ -e "/etc/profile.d/openjdk.sh" ]; then - . /etc/profile.d/openjdk.sh -else - . /etc/profile.d/jdk.sh + +if [ -z "$JAVA_HOME" ]; then + for i in /etc/profile.d/*jdk*.sh; do + if [ -x $i ]; then + source $i + break + fi + done fi PIDFILE="/var/spool/tomcat/tomcat.pid" |