deployMatch.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:astoptool 作者: zouliuyun 项目源码 文件源码
def fetch_and_inflat_package(template_matchServer_ip, remote_dir, matchServer):
    mk_remote_dir(remote_dir)
    with cd(remote_dir):
        #wget = 'wget -c -t 10 -T 10 -q'
        #server_name = 'match_download_{}'.format(TIME)
        #run('''{} --header="Host:{}" http://{}/package.tgz'''.format(wget, server_name, template_matchServer_ip))
        run('tar zxf package.tgz')
        with quiet():
            nginx_conf_exsits = run('test -f /app/nginx/conf/vhost/{}.conf'.format(matchServer)).succeeded
        if nginx_conf_exsits:
            run('mkdir backup')
            run('mv /app/nginx/conf/vhost/{}.conf backup/'.format(matchServer))
        run('cp nginx_matchServer.conf /app/nginx/conf/vhost/{}.conf'.format(matchServer))
        run('''pandora --update -e 'create database {}' '''.format(matchServer))
        run('''pandora --update {} <matchServer_init.sql'''.format(matchServer))
        run('''mkdir -p /app/{}'''.format(matchServer))
        run('''tar zxf matchServer.tgz -C /app/{}'''.format(matchServer))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号