dirdate=bak_`date +%Y%m%d`
cd /usr/local/tomcat_manage/bin/
./shutdown.sh
cd /usr/local/tomcat_web/bin/
./shutdown.sh
echo "==============================================="
echo "===============前端关闭成功=================="
echo "==============================================="
ps -ef | grep febs-server-grp-2.1-RELEASE.jar | grep -v grep | cut -c 9-15 | xargs kill -9
ps -ef | grep febs-server-system-2.1-RELEASE.jar | grep -v grep | cut -c 9-15 | xargs kill -9
echo "==============================================="
echo "===============后端关闭成功=================="
echo "==============================================="
cd /app/data/www/
mkdir /app/data/www/bak_manage/$dirdate
mkdir /app/data/www/bak_web/$dirdate
mv -f /app/data/www/manage/* /app/data/www/bak_manage/$dirdate
mv -f /app/data/www/web/* /app/data/www/bak_web/$dirdate
echo "==============================================="
echo "===============前端备份成功=================="
echo "==============================================="
cd /app/data/www/
mkdir /app/data/www/bak_cloud/$dirdate
mv febs-server-grp-2.1-RELEASE.jar /app/data/www/bak_cloud/$dirdate
mv febs-server-system-2.1-RELEASE.jar /app/data/www/bak_cloud/$dirdate
echo "==============================================="
echo "===============后端备份成功=================="
echo "==============================================="
cd /app/temp/
rm -rf /app/temp/java/*
rm -rf /app/temp/web/grp/*
rm -rf /app/temp/web/sys/*
unzip -o java.zip
echo "-------------------解压"
mv -f /app/temp/java/* /app/data/www/
cd /app/data/www/
nohup java -jar febs-server-grp-2.1-RELEASE.jar &
echo "-------------------担保后端启动"
nohup java -jar febs-server-system-2.1-RELEASE.jar &
echo "-------------------综管后端启动"
echo "==============================================="
echo "===============后端启动成功=================="
echo "==============================================="
cd /app/temp/
mv -f /app/temp/web/sys/* /app/data/www/manage/
mv -f /app/temp/web/grp/* /app/data/www/web/
cd /usr/local/tomcat_manage/bin/
./startup.sh
echo "-------------------综管前端启动"
cd /usr/local/tomcat_web/bin/
./startup.sh
echo "-------------------担保前端启动"
echo "==============================================="
echo "===============前端启动成功=================="
echo "==============================================="