You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by bs...@apache.org on 2005/07/28 10:05:58 UTC

svn commit: r225727 - /geronimo/scripts/startup.sh

Author: bsnyder
Date: Thu Jul 28 01:05:49 2005
New Revision: 225727

URL: http://svn.apache.org/viewcvs?rev=225727&view=rev
Log:
Adding the beginnings of a startup shell script.

Added:
    geronimo/scripts/startup.sh   (with props)

Added: geronimo/scripts/startup.sh
URL: http://svn.apache.org/viewcvs/geronimo/scripts/startup.sh?rev=225727&view=auto
==============================================================================
--- geronimo/scripts/startup.sh (added)
+++ geronimo/scripts/startup.sh Thu Jul 28 01:05:49 2005
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+#  Copyright 2005 The Apache Software Foundation
+# 
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+# --------------------------------------------------------------------
+# $Rev$ $Date$
+# --------------------------------------------------------------------
+
+BIN_DIR=bin
+SERVER_JAR=$BIN_DIR/server.jar
+ARGS='-Djava.endorsed.dirs=lib/endorsed'
+
+if [ -z "$JAVA_HOME" ]; then
+    JAVA=`which java`
+    if [ -z "$JAVA" ]; then
+        echo "Unable to locate Java binary. Please add it to the PATH."
+        exit 1
+    fi
+    JAVA_BIN=`dirname $JAVA`
+    JAVA_HOME=$JAVA_BIN/..
+fi
+
+JAVA=$JAVA_HOME/bin/java
+
+if [ ! -d "$BIN_DIR" ]; then 
+    echo "Unable to locate the $BIN_DIR directory"
+    exit 1
+fi
+
+if [ ! -f "$SERVER_JAR" ]; then 
+    echo "Unable to locate the $SERVER_JAR jar"
+    exit 1
+fi
+
+$JAVA $ARGS -jar $SERVER_JAR "$@"

Propchange: geronimo/scripts/startup.sh
------------------------------------------------------------------------------
    svn:executable = *