• 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"
  • 相关阅读:
    javascript 编码规范
    javascript 减少全部变量
    轮播图 jquery
    SVN MAC
    php excel
    php email
    查看网站后台
    linux 下载文件
    第6周小组作业:软件测试和评估
    第4周小组作业:WordCount优化
  • 原文地址:https://www.cnblogs.com/my-first-blog-lgz/p/13936485.html
Copyright © 2020-2023  润新知