9559 【越南】服务器调整只用C盘(中心相关工具:开关服、机器人、语音、媒体卡)
| | |
| | | def main():
|
| | | time.sleep(1)
|
| | | os.system("title 服务器控制台-%s"%datetime.datetime.today())
|
| | | mylog.InitLog(r"D:/ServerLog", "RemoteServer.txt", False, Def_Debug)
|
| | | mylog.InitLog(r"C:/ServerLog", "RemoteServer.txt", False, Def_Debug)
|
| | |
|
| | | CenterPort = int(ReadConfig.ReadConfig(os.getcwd() + "\\config.ini").GetValue("Remote", "Port"))
|
| | |
|
| | |
| | | pResult = pResult.read()
|
| | | if "PID" in pResult or "pid" in pResult:
|
| | | return " =======服务器已经开启,请再次确认服务器情况, EventServer.exe运行中"
|
| | | #os.system(r"call D:\ProjectServer\LaunchServerManager\正常开服.bat")
|
| | | #os.system(r"call C:\ProjectServer\LaunchServerManager\正常开服.bat")
|
| | | # system call会导致子进程占用父进程的文件描述符导致端口无法释放, 影响重启使用
|
| | | # 如果需要保持子进程持续长期运行的应该调用 subprocess.Popen(cmd, close_fds=True)
|
| | | cmd = r"D:\ProjectServer\LaunchServerManager\正常开服.bat"
|
| | | cmd = r"C:\ProjectServer\LaunchServerManager\正常开服.bat"
|
| | | subprocess.Popen(cmd, close_fds=True)
|
| | | return "open success"
|
| | | elif result == "close":
|
| | | # 记得关服后或者重启机器需自动启动服务器控制台
|
| | | os.system(r"call D:\ProjectServer\LaunchServerManager\正常关服.bat")
|
| | | os.system(r"call C:\ProjectServer\LaunchServerManager\正常关服.bat")
|
| | | return "close success"
|
| | |
|
| | | return
|
| | |
| | |
|
| | | PlayerOffTime=180
|
| | | ProcessFindTJGTime=30
|
| | | ServerDBConfigPath=D:\ProjectServer\db\PyMongoDataServer
|
| | | ServerDBConfigPath=C:\ProjectServer\db\PyMongoDataServer
|
| | | StartRunTime=180
|
| | |
|
| | | TJGLimitCnt=200 |
| | |
| | | def InitMyLog( LogName, addConsule = False, LEV = logging.DEBUG ):
|
| | | # set up logging to file - see previous section for more details
|
| | | now = localtime()
|
| | | filePath = r"D:\ServerLog\InsideRobot"
|
| | | filePath = r"C:\ServerLog\InsideRobot"
|
| | | fileName = filePath + r"\%s-%d-%d-%d.log" % ( LogName, now.tm_year, now.tm_mon, now.tm_mday )
|
| | | if not os.path.exists(filePath):
|
| | | os.makedirs(filePath)
|
| | |
| | |
|
| | | PlayerOffTime=10
|
| | | ProcessFindTJGTime=10
|
| | | ServerDBConfigPath=D:\ProjectServer\db\PyMongoDataServer
|
| | | ServerDBConfigPath=C:\ProjectServer\db\PyMongoDataServer
|
| | | StartRunTime=10
|
| | |
|
| | | ;账号获取来源 0:自动生成, 1:取库中已有账号
|
| | |
| | | def InitMyLog( LogName, addConsule = False, LEV = logging.DEBUG ):
|
| | | # set up logging to file - see previous section for more details
|
| | | now = localtime()
|
| | | file = r"D:\ServerLog\%s-%d-%d-%d.log" % ( LogName, now.tm_year, now.tm_mon, now.tm_mday )
|
| | | file = r"C:\ServerLog\%s-%d-%d-%d.log" % ( LogName, now.tm_year, now.tm_mon, now.tm_mday )
|
| | | logging.basicConfig(level=LEV,
|
| | | format='%(name)-12s %(asctime)s %(name)-12s %(levelname)-8s %(message)s',
|
| | | datefmt='%Y-%m-%dT%H:%M:%S',
|
| | |
| | | def InitMyLog( LogName, addConsule = False, LEV = logging.INFO ):
|
| | | # set up logging to file - see previous section for more details
|
| | | now = localtime()
|
| | | filePath = r"D:\ServerLog\WebBottle"
|
| | | filePath = r"C:\ServerLog\WebBottle"
|
| | | fileName = filePath + r"\%s-%d-%d-%d.log" % ( LogName, now.tm_year, now.tm_mon, now.tm_mday )
|
| | | if not os.path.exists(filePath):
|
| | | os.makedirs(filePath)
|
| | |
| | | def main():
|
| | | time.sleep(1)
|
| | | os.system("title Coupon-%s"%datetime.datetime.today())
|
| | | mylog.InitLog(r"D:/ServerLog", "Coupon.txt", False, Def_Debug)
|
| | | mylog.InitLog(r"C:/ServerLog", "Coupon.txt", False, Def_Debug)
|
| | |
|
| | |
|
| | | CenterPort = int(ReadConfig.ReadConfig(os.getcwd() + "\\config.ini").GetValue("Coupon", "CenterPort"))
|
| | |
| | | def main():
|
| | | time.sleep(1)
|
| | | os.system("title CouponCode-%s"%datetime.datetime.today())
|
| | | mylog.InitLog(r"D:/ServerLog", "CouponCode.txt", False, Def_Debug)
|
| | | mylog.InitLog(r"C:/ServerLog", "CouponCode.txt", False, Def_Debug)
|
| | |
|
| | |
|
| | | CenterPort = int(ReadConfig.ReadConfig(os.getcwd() + "\\..\\Coupon\\config.ini").GetValue("Coupon", "CodePort", 53003))
|
| | |
| | | # center.secondworld.net.cn
|
| | | def main():
|
| | | os.system("title AD-%s"%datetime.datetime.today())
|
| | | mylog.InitLog(r"D:/ServerLog", "ad.txt", True, DEF_DEBUG)
|
| | | mylog.InitLog(r"C:/ServerLog", "ad.txt", True, DEF_DEBUG)
|
| | |
|
| | | adport = 53004
|
| | | if len(sys.argv) == 2:
|
| | |
| | | def InitMyLog( LogName, addConsule = False, LEV = logging.INFO ):
|
| | | # set up logging to file - see previous section for more details
|
| | | now = localtime()
|
| | | filePath = r"D:\ServerLog\WebBottle"
|
| | | filePath = r"C:\ServerLog\WebBottle"
|
| | | fileName = filePath + r"\%s-%d-%d-%d.log" % ( LogName, now.tm_year, now.tm_mon, now.tm_mday )
|
| | | if not os.path.exists(filePath):
|
| | | os.makedirs(filePath)
|