shutdown.sh
上传用户:bj_pst
上传日期:2019-07-07
资源大小:7353k
文件大小:1k
源码类别:

Java编程

开发平台:

Java

  1. #!/bin/sh
  2. # -----------------------------------------------------------------------------
  3. # Stop script for the CATALINA Server
  4. #
  5. # $Id: shutdown.sh 758256 2009-03-25 13:43:00Z mturk $
  6. # -----------------------------------------------------------------------------
  7. # resolve links - $0 may be a softlink
  8. PRG="$0"
  9. while [ -h "$PRG" ] ; do
  10.   ls=`ls -ld "$PRG"`
  11.   link=`expr "$ls" : '.*-> (.*)$'`
  12.   if expr "$link" : '/.*' > /dev/null; then
  13.     PRG="$link"
  14.   else
  15.     PRG=`dirname "$PRG"`/"$link"
  16.   fi
  17. done
  18.  
  19. PRGDIR=`dirname "$PRG"`
  20. EXECUTABLE=catalina.sh
  21. # Check that target executable exists
  22. if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
  23.   echo "Cannot find $PRGDIR/$EXECUTABLE"
  24.   echo "This file is needed to run this program"
  25.   exit 1
  26. fi
  27. exec "$PRGDIR"/"$EXECUTABLE" stop "$@"