19,611
社区成员
发帖
与我相关
我的任务
分享
#!/bin/sh
printf "Please input NewCodeFile name:"
read FileName
#ls $FileName
#if test $? -eq 0
if test -f $FileName
then
echo the server is shutdowning...
/u01/sdy/apache-tomcat-7.0.5/bin/shutdown.sh
echo the old file is removing...
rm -rf /u01/sdy/apache-tomcat-7.0.5/webapps/ROOT
cd /u01/sdy/apache-tomcat-7.0.5/webapps/
echo newCode is extract...
unzip $FileName
nohup ./../bin/startup.sh &
else
echo File not found... Please retry...
fi
#! /bin/bash
# 设定环境
# 执行命令
shutdown
rm -rf
cd
...