使用wlst脚本更新weblogic

#!/bin/bash
# 获取项目名称
PROJECT_NAME=$1

# weblogic安装目录
WEBLOGIC_HOME="/mnt/installer/weblogic12"

# weblogic控制台信息
CONSOLE_URL="t3://localhost:8686"
CONSOLE_USER="weblogic"
CONSOLE_PWD="xxx"

# 关闭原进程
kill -9 `ps -ef | grep -v grep | grep ${PROJECT_NAME}| grep jar|awk '{print$2}'`

# 清理程序日志
rm -rf /mnt/logs/${PROJECT_NAME}/*

# 清理weblogic缓存
rm -rf ${WEBLOGIC_HOME}/user_projects/domains/base_domain/servers/${PROJECT_NAME}/{cache,data,logs,stage,tmp}

# 重新部署weblogic
${WEBLOGIC_HOME}/wlserver/common/bin/wlst.sh <<EOF
connect("${CONSOLE_USER}","${CONSOLE_PWD}","${CONSOLE_URL}")
redeploy("${PROJECT_NAME}")
exit
exit()
EOF