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

  • 相关阅读:
    移除roadhog用webpack4代替
    git pull request
    java 希尔排序 归并排序 快速排序 三路快速排序
    简洁的 async await
    react-navigation 实现简单登录 跳转路由
    d3序数比例尺理解
    echarts vue 甘特图实现
    element table 实现鼠标拖拽选中
    CSS一些总结
    Nginx location 匹配规则
  • 原文地址:https://www.cnblogs.com/zhoading/p/11996174.html
Copyright © 2011-2022 走看看