deployMatch.py 文件源码

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

项目:astoptool 作者: zouliuyun 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号