def add_match_dns(self):
@hosts('dns')
def _add_match_dns(id, ip):
dns_add_cmd = '/app/opbin/dns/dnsapi -g {0} -a add -d match{1}.{0} -l 1 -i {2}'.format(GAME, id, ip)
print('??????????????: {}'.format(dns_add_cmd))
ret_value = run(dns_add_cmd)
if ret_value != 'Record add success':
print('[WARNING] Failed to add dns, you can try again manually: {}'.format(dns_add_cmd))
execute(_add_match_dns, self.id, self.ip)
# def clean_job(self):
#
# @hosts(self.template_matchServer)
# def _clean_on_template_server():
# with cd('/app/nginx/conf/vhost'):
# run('rm -f download_{}.conf'.format(TIME))
# reload_nginx()
#
# execute(_clean_on_template_server)
评论列表
文章目录