Starts troubleshooting of port not changing after config change.

This commit is contained in:
Andrew 2021-09-13 17:52:09 -04:00
parent c93ce1613d
commit 92725d2249
2 changed files with 5 additions and 9 deletions

View File

@ -219,7 +219,8 @@ class Stats:
# TODO: search server properties file for possible override of 127.0.0.1
internal_ip = server_data.get('server_ip', "127.0.0.1")
server_port = server_settings.get('server-port', "25565")
server_port = server_data.get('server_port', "25565")
print('PORT', server_port)
logger.debug("Pinging server '{}' on {}:{}".format(s.get('server_name', "ID#{}".format(server_id)), internal_ip, server_port))
int_mc_ping = ping(internal_ip, int(server_port))
@ -277,7 +278,9 @@ class Stats:
# TODO: search server properties file for possible override of 127.0.0.1
internal_ip = server_data.get('server_ip', "127.0.0.1")
server_port = server_settings.get('server-port', "25565")
server_port = server_data.get('server_port', "25565")
print(internal_ip)
print(server_port)
logger.debug("Pinging server '{}' on {}:{}".format(server.name, internal_ip, server_port))
int_mc_ping = ping(internal_ip, int(server_port))

View File

@ -622,19 +622,12 @@ class PanelHandler(BaseHandler):
Servers.logs_delete_after: logs_delete_after,
}).where(Servers.server_id == server_id).execute()
Server_Stats.update({
Server_Stats.server_port: server_port,
}).where(Server_Stats.server_id == server_id).execute()
self.controller.refresh_server_settings(server_id)
db_helper.add_to_audit_log(exec_user['user_id'],
"Edited server {} named {}".format(server_id, server_name),
server_id,
self.get_remote_ip())
svr = self.controller.get_server_obj(server_id)
svr.reload_server_settings()
self.redirect("/panel/server_detail?id={}&subpage=config".format(server_id))