zoukankan      html  css  js  c++  java
  • linux下使用shell脚本批处理命令

    1.新建脚本touch first.sh

    2.写入命令vi first.sh

    #!/bin/bash
    #publish service and api
    
    echo "copy file"
    docker cp /home/huqing/dotnet/a.zip common_api:/usr/api/a.zip
    docker cp /home/huqing/dotnet/b.zip common_service:/usr/service/b.zip
    echo "unzip file"
    docker exec common_api unzip -o -d /usr/api /usr/api/a.zip
    docker exec common_service unzip -o -d /usr/service /usr/service/b.zip
    echo "shutdown superviser"
    docker exec common_api supervisorctl shutdown
    docker exec common_service supervisorctl shutdown
    echo "start superviser"
    docker exec common_api supervisord -c /etc/supervisor/supervisord.conf
    docker exec common_service supervisord -c /etc/supervisor/supervisord.conf
    echo "check ps"
    docker exec common_api ps -ef | grep businessplus
    docker exec common_service ps -ef | grep businessplus
    echo "done"

    3.执行命令sh first.sh

  • 相关阅读:
    cookie 和 session 和 session id
    getMasterRequest VS getCurrentRequest?
    drupal 7 watchdog 记录debug信息
    刷环境
    再进一步
    7zip 不见 .git
    为什么我记不住密码
    www / publish
    behat debug / class property
    drupal 网站Log
  • 原文地址:https://www.cnblogs.com/qinghub/p/6401079.html
Copyright © 2011-2022 走看看