脚本文件启动tomcat(替换配置文件)

#!/bin/sh


root_path=/usr/local/interface
project_name=vod_interface


ps x|grep vod_interface | grep -v grep |awk '{print $1}' |xargs kill -9


#unpack war
echo 'delete old folder:' $root_path/$project_name/webapps/$project_name
rm -rf  $root_path/$project_name/webapps/$project_name


echo 'create new folder:project_name'
mkdir  $root_path/$project_name/webapps/$project_name
cd $root_path/$project_name/webapps/$project_name
echo 'change dir:'$root_path/$project_name/webapps/$project_name
echo 'unpack war ................'
jar -xvf $root_path/interface_param/vod_interface_param/war/$project_name.war


echo 'update params ........'
cd $root_path/$project_name/webapps/$project_name
cp -rf $root_path/interface_param/vod_interface_param/$project_name/* ./


echo 'start tomcat:'$project_name
cd $root_path/$project_name/bin
./startup.sh


#tail -n 10 $root_path/$project_name/update.log

你可能感兴趣的:(linux,tomcat)