ITeye博客

重启tomcat之shell脚本

killeraction · 2013-09-03 17:59 · shell 脚本 · 操作系统 · Markdown

#!/bin/bash
pid=`lsof -i:8080 |sed -n 2p  | awk '{print $2}'`

echo $pid

if [ "-$pid" = "-"  ];then
	echo "start to restart tomcat at port 8080"
	su -  huawei -c 'sh /home/huawei/tomcat/bin/startup.sh'  
#	cd /home/huawei/tomcat/bin
	#sh startup.sh

fi

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。