Auto Closing of Server after Update

Hi! An approach like this one should work if you want to stop the server and it should free up that port again as far as I know: