<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      shell 腳本切換IBM產品的IP

      #!/bin/bash
      #
      #1.檢查執行命令的用戶是否是devadmin
      #2.獲取用戶執行腳本的選項參數 ,參數輸入不全,退出腳本
      #3.停止SFG
      #4.判斷sandbox文件是否有ORACLE_JDBC_URL相關配置,有修改value的IP,沒有添加key和value
      #5.執行setfiles.sh
      #6.執行pathchJNLP.sh
      #7啟動SFG
      cur_date=`date '+%F %T'`

      #Reject CTRL + C abort script
      trap 'echo "no quiting"' INT

      #Confirm the current login user
      userLogin=`whoami`
      if [ $userLogin != 'devadmin' ]; then
      echo 'Permission denied'
      exit 1
      fi

      #Get input parameters
      while getopts ":a:o:b:c:d:e:" OPT; do
      case $OPT in
      a)
      localhostIP=$OPTARG ;;
      o)
      oracleIP=$OPTARG ;;
      b)
      ssp1IP=$OPTARG ;;
      c)
      ssp2IP=$OPTARG ;;
      d)
      sfg1IP=$OPTARG ;;
      e)
      sfg2IP=$OPTARG ;;
      *) echo -e "The entered options are incorrect.\n-a localhost ip\n-o oracle server ip\n-b ssp1 ip\n-c ssp2 ip\n-d sfg1 and SEAS1 ip\n-e sfg2 and SEAS2 ip"&&exit 1
      esac
      done

      if [ -z "$localhostIP" ] || [ -z "$oracleIP" ] || [ -z "$ssp1IP" ] || [ -z "$ssp2IP" ] || [ -z "$sfg1IP" ] || [ -z "$sfg2IP" ]; then
      echo "Parameter incomplete.Enter -h to view the parameter list"&&exit 1
      fi
      #---------------------------------------------------SFG----------------------------------------------------------------------------------
      change_log=~/changeIP.log
      sandbox=~/b2b/IBM/SterlingIntegrator/install/properties/sandbox.cfg
      sfg_bin=~/b2b/IBM/SterlingIntegrator/install/bin

      echo -e "$cur_date\tstart change SFG to connect ORACLE IP"|tee -a $change_log
      cd $sfg_bin&&./hardstop.sh
      if `! cat $sandbox | grep ORACLE_JDBC_URL>>/dev/null`;then
      sed -i "\$a\ORACLE_JDBC_URL=jdbc:oracle:thin:@$oracleIP:1521/orcl" $sandbox
      else
      sed -i "s/^ORACLE_JDBC_URL.*/ORACLE_JDBC_URL=jdbc:oracle:thin:@$oracleIP:1521\/orcl/" $sandbox
      fi
      #`! cat $sandbox | grep ORACLE_JDBC_URL>>/dev/null`&& sed -i "$a\ORACLE_JDBC_URL=jdbc:oracle:thin:@$oracle_ip:1521/orcl" $sandbox
      cd $sfg_bin&& ./setupfiles.sh>>$change_log
      echo -e "$cur_date\tend change SFG connect to ORACLE IP"|tee -a $change_log

      echo -e "$cur_date\tstart change SFG IP"|tee -a $change_log
      cd $sfg_bin&&./patchJNLP.sh $localhostIP|tee -a $change_log
      ./run.sh
      echo -e "$cur_date\tend change SFG IP"|tee -a $change_log

       

      #------------------------------------------------SSPcm------------------------------------------------------------------------------------
      #停止SSPcm
      #執行ip變更命令
      #啟動SSPcm
      sspcm_bin=~/SSPcm/bin
      sspcm_passwd=P@ssw0rd
      sspcm_admin_id=admin
      sspcm_admin_passwd=P@ssw0rd
      echo -e "$cur_date\tstart change SSPcm IP"|tee -a $change_log
      cd $sspcm_bin
      #stopCM涉及密碼交互,自動處理
      /usr/bin/expect <<-EOF
      set timeout 20
      spawn ./stopCM.sh
      expect {
      "passphrase for CM" { send "$sspcm_passwd\r"; exp_continue }
      "administrator id" { send "$sspcm_admin_id\r"; exp_continue }
      "administrator password" { send "$sspcm_admin_passwd\r"; }
      }
      expect eof
      EOF
      ./configureAccepter.sh address=$localhostIP&&./startCM.sh|tee -a $change_log

      #------------------------------------------------SSPcm deploy-----------------------------------------------------------------------------
      #判斷SSPcm 8443端口是否存在,不存在等待1s,再次循環,存在進行下一步
      #執行RestAPI,先get,sed修改,在update
      ssp_name1=ssp
      ssp_name2=ssp2
      sleep 3
      while ! netstat -nlut|grep :8443 >/dev/null; do
      sleep 1
      echo "Waiting for port 8443 to start"|tee -a $change_log
      done
      echo "8443 is listen"|tee -a $change_log
      #getall_engine(不需要密碼交互)
      sed -i "s@#\(.*\.102=.*workDir\=\).*@\1$sspcm_bin@g" sspRestAPI.properties
      #sed -i 's/\r//g' sspRestAPI.properties
      ./sspRestAPI.sh -f props=sspRestAPI.properties|tee -a $change_log
      #update ssp1.xml
      sed -i "s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/$ssp1IP/g" $ssp_name1.xml
      #update ssp2.xml
      sed -i "s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/$ssp2IP/g" $ssp_name2.xml
      #將get注釋掉
      sed -i "s/.*\.102.*/\#&/g" sspRestAPI.properties
      #update_engine
      sed -i "s@#\(.*\.106=.*name=\).*\(inputFile=\).*@\1$ssp_name1 \2$sspcm_bin/$ssp_name1.xml@g" sspRestAPI.properties
      ./sspRestAPI.sh -f props=sspRestAPI.properties|tee -a $change_log
      sed -i "s@#*\(.*\.106=.*name=\).*\(inputFile=\).*@\1$ssp_name2 \2$sspcm_bin/$ssp_name2.xml@g" sspRestAPI.properties
      ./sspRestAPI.sh -f props=sspRestAPI.properties|tee -a $change_log
      #將update注釋掉
      sed -i "s/.*\.106.*/\#&/g" sspRestAPI.properties
      rm -rf $ssp_name1.xml $ssp_name2.xml

      #get_Netmap(需要密碼交互)
      Netmaps_name=yx_Netmap
      outboundNodes_name1=yx_openssh
      outboundNodes_name2=sfg_11022
      outboundNodes_name3=sfg_12022
      outboundNodes_name4=sfg_13022
      sed -i "s@#\(.*\.305=.*workDir\=\).*\(name=\).*@\1$sspcm_bin \2$Netmaps_name@g" sspRestAPI.properties
      #Netmap get請求涉及密碼交互,自動處理
      /usr/bin/expect <<-EOF
      set timeout 20
      spawn ./sspRestAPI.sh -f props=sspRestAPI.properties
      expect {
      "passphrase for encrypting sensitive information" { send "$sspcm_passwd\r"; exp_continue }
      "Confirm passphrase" { send "$sspcm_passwd\r"; }
      }
      expect eof
      EOF

      line_name1=`cat -n $Netmaps_name.xml |grep $outboundNodes_name1|awk 'NR>1{print $1}'`
      line_name2=`cat -n $Netmaps_name.xml |grep $outboundNodes_name2|awk 'NR>1{print $1}'`
      line_name3=`cat -n $Netmaps_name.xml |grep $outboundNodes_name3|awk 'NR>1{print $1}'`
      line_name4=`cat -n $Netmaps_name.xml |grep $outboundNodes_name4|awk 'NR>1{print $1}'`
      let line1=$line_name1+4
      let line2=$line_name2+4
      let line3=$line_name3+4
      let line4=$line_name4+4

      #將get注釋掉
      sed -i "s/.*\.305.*/\#&/g" sspRestAPI.properties
      #修改Netmap配置文件
      sed -i "/$outboundNodes_name1/{n; s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/$sfg1IP/}" $Netmaps_name.xml
      sed -i "/$outboundNodes_name2/{n; s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/$sfg1IP/}" $Netmaps_name.xml
      sed -i "/$outboundNodes_name3/{n; s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/$sfg2IP/}" $Netmaps_name.xml
      sed -i "/$outboundNodes_name4/{n; s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/$sfg2IP/}" $Netmaps_name.xml
      sed -i "$line1{s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/$sfg1IP/g}" $Netmaps_name.xml
      sed -i "$line2{s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/$sfg1IP/g}" $Netmaps_name.xml
      sed -i "$line3{s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/$sfg2IP/g}" $Netmaps_name.xml
      sed -i "$line4{s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/$sfg2IP/g}" $Netmaps_name.xml
      #update Netmap
      sed -i "s@#\(.*\.308=.*name=\).*\(inputFile=\).*@\1$Netmaps_name \2$sspcm_bin/$Netmaps_name.xml@g" sspRestAPI.properties
      #Netmap update請求涉及密碼交互,自動處理
      /usr/bin/expect <<-EOF
      set timeout 20
      spawn ./sspRestAPI.sh -f props=sspRestAPI.properties
      expect {
      "passphrase for decrypting sensitive information" { send "$sspcm_passwd\r"; exp_continue }
      "Confirm passphrase" { send "$sspcm_passwd\r"; }
      }
      expect eof
      EOF
      #將update注釋掉
      sed -i "s/.*\.308.*/\#&/g" sspRestAPI.properties
      rm -rf $Netmaps_name.xml


      #get_SEAS(不需要密碼交互)
      SEAS1_name=SEAS
      SEAS2_name=SEAS2
      sed -i "s@#\(.*\.202=.*workDir\=\).*@\1$sspcm_bin@g" sspRestAPI.properties
      ./sspRestAPI.sh -f props=sspRestAPI.properties|tee -a $change_log
      #將get注釋掉
      sed -i "s/.*\.202.*/\#&/g" sspRestAPI.properties
      #修改SEAS配置文件
      sed -i "s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/$sfg1IP/g" $SEAS1_name.xml
      sed -i "s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/$sfg2IP/g" $SEAS2_name.xml
      #update SEAS1
      sed -i "s@#\(.*\.206=.*name=\).*\(inputFile=\).*@\1$SEAS1_name \2$sspcm_bin/$SEAS1_name.xml@g" sspRestAPI.properties
      ./sspRestAPI.sh -f props=sspRestAPI.properties|tee -a $change_log
      #update SEAS2
      sed -i "s@#*\(.*\.206=.*name=\).*\(inputFile=\).*@\1$SEAS2_name \2$sspcm_bin/$SEAS2_name.xml@g" sspRestAPI.properties
      ./sspRestAPI.sh -f props=sspRestAPI.properties|tee -a $change_log
      #將update注釋掉
      sed -i "s/.*\.206.*/\#&/g" sspRestAPI.properties
      rm -rf $SEAS1_name.xml $SEAS2_name.xml
      echo -e "$cur_date\tend change SSPcm IP"|tee -a $change_log

       

      posted @ 2022-07-05 09:32  瘦阿瘦  閱讀(65)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 奈曼旗| 九九热视频在线精品18| 免费无码一区二区三区蜜桃大| 久久精品不卡一区二区| 无码专区 人妻系列 在线 | 国产亚洲精品综合99久久| 中文字幕久久国产精品| 日本大片在线看黄a∨免费| 九九热视频在线观看精品| 四川丰满少妇无套内谢| 亚洲自拍偷拍激情视频| 亚洲精品一区二区三区大桥未久| 国产台湾黄色av一区二区| 正在播放肥臀熟妇在线视频| 人人妻人人做人人爽夜欢视频| 一个色综合亚洲热色综合| 久久精品这里热有精品| 中文字幕国产日韩精品| 日韩熟女精品一区二区三区| 黑森林福利视频导航| 午夜国产小视频| 久久大香萑太香蕉av黄软件| 18禁一区二区每日更新| 成全高清在线播放电视剧| 久久蜜臀av一区三区| av中文字幕一区二区| 国产成人久久777777| 亚洲国产成人无码电影| 国产精品老熟女露脸视频| 国产精品自拍中文字幕| 欧美乱大交aaaa片if| 亚洲另类无码一区二区三区| 伊人成人在线视频免费| 国内综合精品午夜久久资源| 中文日产幕无线码一区中文| 国产午夜精品理论大片| 日韩不卡一区二区三区四区| 精品少妇爆乳无码aⅴ区| 亚洲 日韩 国产 制服 在线| 亚洲天堂激情av在线| 天堂在/线中文在线资源 官网 |