zoukankan      html  css  js  c++  java
  • 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 "33[33m-----------------------${i}------------------------------33[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 "33[31m[WRING...] ${dir_war}中无war包!33[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 "33[31m[WRING...] ${i}包名不匹配,请检查!33[0m" >>deploy.tmp
                ;;
        esac
    done
    [ -f deploy.tmp ]&&cat deploy.tmp
    [ -f deploy.tmp ]&&rm -f deploy.tmp
    echo -e "33[32m部署完成!请查看相应启动日志。33[0m"
  • 相关阅读:
    webservice调用三种方式
    webservice访问权限控制利用TOMCAT用户
    ubuntu添加ppa源
    win7与ubuntu共享文件夹
    Cinema 4D* 中令人惊叹的体积效果
    线程并行化的概念及其用法
    什么是代码现代化?
    英特尔® 软件开发人员十大故事 | 五月
    英特尔® 实感™ 前置摄像头 SR300 和 F200 的比较
    面向英特尔® x86 平台的 Unity* 优化指南: 第 1 部分
  • 原文地址:https://www.cnblogs.com/my-first-blog-lgz/p/13936485.html
Copyright © 2011-2022 走看看