Add feature where if server executable is changed in config it also changes the execution string to match.

This commit is contained in:
Andrew 2021-11-27 14:29:28 -05:00
parent b6a4698486
commit db4812c8ea

View File

@ -647,6 +647,12 @@ class PanelHandler(BaseHandler):
return
server_obj = self.controller.servers.get_server_obj(server_id)
server_settings = self.controller.get_server_data(server_id)
stale_executable = server_obj.executable
#Compares old jar name to page data being passed. If they are different we replace the executable name in the execution string.
if str(stale_executable) != str(executable):
execution_command = execution_command.replace(str(stale_executable), str(executable))
server_obj.server_name = server_name
server_obj.path = server_path
server_obj.log_path = log_path