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))
评论列表
文章目录