• 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

  • 相关阅读:
    双指针算法_最长连续不重复子列长度
    前缀和_子矩阵的和
    前缀和
    高精度算法_大数除以小数
    高精度算法_大数乘小数
    高精度算法_大数相减
    高精度算法_大数加法
    一维差分矩阵
    二维差分矩阵
    整数二分
  • 原文地址:https://www.cnblogs.com/zhoading/p/11996174.html
Copyright © 2020-2023  润新知