#判断操作系统
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

1. Tomcat之startup.sh的更多相关文章

  1. 【sh文件权限】无法启动tomcat -bash: ./startup.sh: Permission denied

    今天在Linux上启动Tomcat,结果弹出:-bash: ./startup.sh: Permission denied 的提示. 这是因为用户没有权限,而导致无法执行, 用命令chmod 修改一下 ...

  2. linux下Tomcat 安装后执行startup.sh,出现– Cannot find …bin/catalina.sh

    linux下Tomcat 安装后执行startup.sh,出现– Cannot find …bin/catalina.sh 是因为权限不够,执行以下命令就可以: chmod +x startup.sh ...

  3. linux中tomcat startup.sh出现commond not found

    问题: 前些天,再Linux提交更新代码启动tomcat时报commond not found 过程: 查了下百度,http://code2care.org/2015/-bash:-startup.s ...

  4. CentOS7启动Tomcat报错:./startup.sh: Permission denied

    错误信息:./startup.sh: Permission denied 执行./startup.sh,或者./shutdown.sh的时候, 报:Permission denied,因为是执行tom ...

  5. Docker - 容器中的tomcat如何使用startup.sh启动

    网上大多介绍的catalina.sh启动,因为docker容器中,无法直接启动startup.sh. 解决方法: 编辑catalina.sh,找到 >> "$CATALINA_O ...

  6. Whats the difference between service tomcat ./startup.sh and ./catalina.sh run

    stack overflow 给出的答案: catalina.sh run starts tomcat in the foreground, displaying the logs on the co ...

  7. centos7中启动tomcat提示bash: tomcat8.0.39/bin/startup.sh: 权限不够

    问题描述: centos7中启动tomcat提示bash: tomcat8.0.39/bin/startup.sh: 权限不够 解决方案:先进入bin目录 [root@localhost/]# cd ...

  8. tomcat不能多次startup.sh,异常时直接,分析logs目录下的日志。

    tomcat不能多次startup.sh,异常时直接干掉其进程. 分析logs目录下的日志.

  9. 关于LINUX权限-bash: ./startup.sh: Permission denied

    关于LINUX权限-bash: ./startup.sh: Permission denied <script type="text/javascript"></ ...

随机推荐

  1. keras模块学习之-激活函数(activations)--笔记

    本笔记由博客园-圆柱模板 博主整理笔记发布,转载需注明,谢谢合作! 每一个神经网络层都需要一个激活函数,例如一下样例代码: from keras.layers.core import Activati ...

  2. Visual Studio 2017 许可证已过期解决方案

    1.卸载并重安VS2017 2.安装后打开VS2017,点击帮助=>注册产品,输入序列号NJVYC-BMHX2-G77MM-4XJMR-6Q8QF(企业版), KBJFW-NXHK6-W4WJM ...

  3. Java获取视频的大小、时长

    前端上传视频之后,根据上传的视频文件获取视频的大小和时长 1.获取视频时长 private String ReadVideoTime(File source) { Encoder encoder = ...

  4. 原生Form 和 Form组件 Modelform

    主要的文件:manage.py,url.py,views.py,settings.py,models.py manage.py:项目管理文件,一般不做修改. url.py:路由系统,配置views.p ...

  5. [React] Create an Animate Content Placeholder for Loading State in React

    We will create animated Content Placeholder as React component just like Facebook has when you load ...

  6. 案例:3D切割轮播图

    一.3d转换 3D旋转套路:顺着轴的正方向看,顺时针旋转是负角度,逆时针旋转是正角度 二.代码 <!DOCTYPE html> <html lang="en"&g ...

  7. 检测 nginx 关闭切换keepalived

    检测nginx 端口启用  关闭 keepalived  检测 nginx 进程:然后关闭 keepalived ,关闭漂移IP : cat nginx_pid.sh #!/bin/bash whil ...

  8. P3388 【模板】割点(割顶)&& 桥

    题目背景 割点 题目描述 给出一个n个点,m条边的无向图,求图的割点. 输入输出格式 输入格式: 第一行输入n,m 下面m行每行输入x,y表示x到y有一条边 输出格式: 第一行输出割点个数 第二行按照 ...

  9. vundle 管理插件

    前言:如果不使用vundle的话,进行插件的安装,配置和管理相对会麻烦,曾经没使用vundle的时候我经常遇到无法安装一些vim插件.但使用vundle后你只要在文件中添加一行你的插件名再安装就OK了 ...

  10. Flower(规律+逆向思维)

    Flower: 传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6486 题解: 逆向思维+规律 因为每次剪n-1,所以逆向就是控制n-1朵不变,每次增高1 ...