def template_func(options): from func import template newserverTemplate = template.template(game, language, options.servername, options.ip, options.port , options.mainServername) if options.templatetype: type = options.templatetype.split(",") for i in type: if i.strip() == "": continue check = False if i.strip() in ["sql", "all"]: newserverTemplate.updateServerSql() check = True if i.strip() in ["common", "all"]: newserverTemplate.updateServerLib() check = True if i.strip() in ["gametemplate", "all"]: newserverTemplate.updateServerConf() check = True if i.strip() in ["properties", "all"]: newserverTemplate.updateServerProperties() check = True if i.strip() in ["www", "all"]: newserverTemplate.updateServerWww() check = True if i.strip() in ["nginx", "all"]: newserverTemplate.updateServerNginxConf() check = True if not check: print "不支持的模板类型:" + i sys.exit(1) else: print "请输入生成模板的类型"
recoverserver.run() elif options.action == "deploymix": from func import deployMix newserver = deployMix.deploy(game,language,options.servername,options.mainserver,options.restart,title=options.title,gameurl=options.gameurl,asturl=options.asturl,skipcheck=options.skipcheck) newserver.run() elif options.action == "serverlist": printServerlist() elif options.action == "mobileWwwTestUpdate": from func import mobile_www_test_update mobile_www_test_update.init(game,language,options.version,options.updateType,options.hd) elif options.action == "mobileWwwUpdate": from func import mobile_www_update mobile_www_update.update(game,language,options.version,options.updateType,options.hd) elif options.action == "template": from func import template newserverTemplate = template.template(game,language,options.servername,options.ip,options.port) if options.templatetype: type = options.templatetype.split(",") for i in type: if i.strip() == "": continue check = False if i.strip() in ["sql","all"]: newserverTemplate.updateServerSql() check = True if i.strip() in ["common","all"]: newserverTemplate.updateServerLib() check = True if i.strip() in ["gametemplate","all"]: newserverTemplate.updateServerConf() check = True
skipcheck=options.skipcheck) newserver.run() elif options.action == "serverlist": printServerlist() elif options.action == "mobileWwwTestUpdate": from func import mobile_www_test_update mobile_www_test_update.init(game, language, options.version, options.updateType, options.hd) elif options.action == "mobileWwwUpdate": from func import mobile_www_update mobile_www_update.update(game, language, options.version, options.updateType, options.hd) elif options.action == "template": from func import template newserverTemplate = template.template(game, language, options.servername, options.ip, options.port) if options.templatetype: type = options.templatetype.split(",") for i in type: if i.strip() == "": continue check = False if i.strip() in ["sql", "all"]: newserverTemplate.updateServerSql() check = True if i.strip() in ["common", "all"]: newserverTemplate.updateServerLib() check = True if i.strip() in ["gametemplate", "all"]: newserverTemplate.updateServerConf()