source: nutchez-0.1/tomcat/bin/startup.sh @ 98

Last change on this file since 98 was 66, checked in by waue, 16 years ago

NutchEz - an easy way to nutch

  • Property svn:executable set to *
File size: 1.9 KB
Line 
1#!/bin/sh
2
3# Licensed to the Apache Software Foundation (ASF) under one or more
4# contributor license agreements.  See the NOTICE file distributed with
5# this work for additional information regarding copyright ownership.
6# The ASF licenses this file to You under the Apache License, Version 2.0
7# (the "License"); you may not use this file except in compliance with
8# the License.  You may obtain a copy of the License at
9#
10#     http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17
18# -----------------------------------------------------------------------------
19# Start Script for the CATALINA Server
20#
21# $Id: startup.sh 562770 2007-08-04 22:13:58Z markt $
22# -----------------------------------------------------------------------------
23
24# Better OS/400 detection: see Bugzilla 31132
25os400=false
26darwin=false
27case "`uname`" in
28CYGWIN*) cygwin=true;;
29OS400*) os400=true;;
30Darwin*) darwin=true;;
31esac
32
33# resolve links - $0 may be a softlink
34PRG="$0"
35
36while [ -h "$PRG" ] ; do
37  ls=`ls -ld "$PRG"`
38  link=`expr "$ls" : '.*-> \(.*\)$'`
39  if expr "$link" : '/.*' > /dev/null; then
40    PRG="$link"
41  else
42    PRG=`dirname "$PRG"`/"$link"
43  fi
44done
45 
46PRGDIR=`dirname "$PRG"`
47EXECUTABLE=catalina.sh
48
49# Check that target executable exists
50if $os400; then
51  # -x will Only work on the os400 if the files are:
52  # 1. owned by the user
53  # 2. owned by the PRIMARY group of the user
54  # this will not work if the user belongs in secondary groups
55  eval
56else
57  if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
58    echo "Cannot find $PRGDIR/$EXECUTABLE"
59    echo "This file is needed to run this program"
60    exit 1
61  fi
62fi 
63
64exec "$PRGDIR"/"$EXECUTABLE" start "$@"
Note: See TracBrowser for help on using the repository browser.