zoukankan      html  css  js  c++  java
  • 1. Tomcat之startup.sh


    #判断操作系统
    os400=false
    case "`uname`" in
    OS400*) os400=true;;
    esac

    # 取脚本名称
    PRG="$0"

    # 判断是否是软连接
    while [ -h "$PRG" ] ; do
    # 查看脚本信息
    ls=`ls -ld "$PRG"`
    # 获取真实脚本路径
    link=`expr "$ls" : '.*-> (.*)$'`
    # 是否是绝对路径
    if expr "$link" : '/.*' > /dev/null; then
    PRG="$link"
    else
    PRG=`dirname "$PRG"`/"$link"
    fi
    done

    # 取目录名称
    PRGDIR=`dirname "$PRG"`
    # 定义执行脚本
    EXECUTABLE=catalina.sh

    # Check that target executable exists
    if $os400; then
    # -x will Only work on the os400 if the files are:
    # 1. owned by the user
    # 2. owned by the PRIMARY group of the user
    # this will not work if the user belongs in secondary groups
    eval
    else
    # 判断是否可执行
    if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
    echo "Cannot find $PRGDIR/$EXECUTABLE"
    echo "The file is absent or does not have execute permission"
    echo "This file is needed to run this program"
    exit 1
    fi
    fi

    # 执行catalina.sh start脚本 并附带所有参数
    exec "$PRGDIR"/"$EXECUTABLE" start "$@"
    ————————————————
    版权声明:本文为CSDN博主「QMCoder」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/qq_19457117/article/details/82533391

  • 相关阅读:
    HTML元素解释
    Java命名规范
    HDU 1058 Humble Numbers(DP,数)
    HDU 2845 Beans(DP,最大不连续和)
    HDU 2830 Matrix Swapping II (DP,最大全1矩阵)
    HDU 2870 Largest Submatrix(DP)
    HDU 1421 搬寝室(DP)
    HDU 2844 Coins (组合背包)
    HDU 2577 How to Type(模拟)
    HDU 2159 FATE(二维完全背包)
  • 原文地址:https://www.cnblogs.com/zhoading/p/11996174.html
Copyright © 2011-2022 走看看