weblogic部署脚本
转至:https://www.bbsmax.com/A/lk5aB4b4d1/
#!/bin/bash #date -- #writen lxh dir_war=/home/weblogic/war dir_app=/servyouapp/weblogic/user_projects/domains/shyznwgl_domain/app dir_bak=/home/weblogic/backup dir_restart=/servyouapp/weblogic/user_projects/scripts deal() { echo -e "\033[33m-----------------------${i}------------------------------\033[0m" echo "[INFO] 部署${i}..." echo "[INFO] 备份${i}..." [ -f $dir_bak/${i}. ]&&rm -f $dir_bak/${i}. [ -f $dir_bak/${i}. ]&&mv $dir_bak/${i}. $dir_bak/${i}. [ -f $dir_bak/${i}. ]&&mv $dir_bak/${i}. $dir_bak/${i}. [ -f $dir_app/${i} ]&&mv $dir_app/$i $dir_bak/${i}. mv $dir_war/$i $dir_app/ echo "[START...] ${i}重启中..." sed -i 's/tail/#tail/g' $dir_restart/$ sh $dir_restart/$ sed -i 's/#tail/tail/g' $dir_restart/$ echo "" } echo "检查是否有war包更新..." n1=`ls $dir_war |wc -l` if [ $n1 -eq ];then echo -e "\033[31m[WRING...] ${dir_war}中无war包!\033[0m" exit; fi echo "war包识别..." for i in `ls $dir_war`;do case $i in dzswj-authentication-platform.war) deal reshtyrzyz-nw.sh ;; dzswj-user-manager-platform.war) deal reshmhyz-nw.sh ;; fcsyy-app-nw-web.war) deal reshfcsyz-nw.sh ;; nsqd-nw-web.war) deal reshwszyz-nw.sh ;; nsqd-nw-ws.war) deal reshwszyz-nw.sh ;; wsjs-app-nw-web.war) deal reshwsjsyz-nw.sh ;; wssb-app-nw-web.war) deal reshwssbyz-nw.sh ;; wsz-nw-web.war) deal reshxwszyz-nw.sh ;; *) echo -e "\033[31m[WRING...] ${i}包名不匹配,请检查!\033[0m" >>deploy.tmp ;; esac done [ -f deploy.tmp ]&&cat deploy.tmp [ -f deploy.tmp ]&&rm -f deploy.tmp echo -e "\033[32m部署完成!请查看相应启动日志。\033[0m"
分类:
中间件
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?