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

  • 相关阅读:
    母牛的故事
    实现图的邻接矩阵和邻接表的存储
    各个位数和,找最终和为个位数
    排序5之归并排序
    排序2之冒泡与选择排序
    神奇的魔方
    关于SaveChanges
    ADO.NET Entity Framework 4.0 Self Tracking Entity
    EF4.0自跟踪实体使用小结
    ADO.NET Entity Framework 4.0 新特性
  • 原文地址:https://www.cnblogs.com/zhoading/p/11996174.html
Copyright © 2011-2022 走看看