mirror of
https://github.com/hubHarmony/servii-backend.git
synced 2024-11-17 21:40:31 +00:00
[+] Enable query on the right port on server creation
This commit is contained in:
parent
0747e02fce
commit
cb04876592
@ -107,7 +107,10 @@ def server_create(user: UserRecord, name: str, version: str, framework: str = "p
|
|||||||
file_manager.create_folder(server_path)
|
file_manager.create_folder(server_path)
|
||||||
file_manager.copy_folder_contents(server_template_path, server_path)
|
file_manager.copy_folder_contents(server_template_path, server_path)
|
||||||
file_manager.copy_folder_contents("servers/shared", server_path)
|
file_manager.copy_folder_contents("servers/shared", server_path)
|
||||||
file_manager.update_server_property(server_path + "/server.properties", "server-port", port)
|
prop_path: str = server_path + "/server.properties"
|
||||||
|
file_manager.update_server_property(prop_path, "server-port", port)
|
||||||
|
file_manager.update_server_property(prop_path, "query.port", port)
|
||||||
|
file_manager.update_server_property(prop_path, "enable-query", "true")
|
||||||
return HTTPStatus.CREATED, f"Successfully created server '{name}'."
|
return HTTPStatus.CREATED, f"Successfully created server '{name}'."
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
file_manager.log_error(type(e).__name__, str(e))
|
file_manager.log_error(type(e).__name__, str(e))
|
||||||
|
Loading…
Reference in New Issue
Block a user