BloodyMods / ServerStarter

MIT License
100 stars 64 forks source link

Compatibility with CubeCoders AMP #49

Open Joly0 opened 2 years ago

Joly0 commented 2 years ago

Hey, Serverstarter is super useful, though i have some problems with it using AMP (amp is an application management panel by cubecoders which makes it easy to deploy different game servers fast with a nice web gui)

The Problems i found:

Major Problem: Since recently serverstarter puts everything into a subfolder called setup, and with it the server.properties file. Amp puts this file into the main folder as it always was and where usually the jar files are. Therefore serverstarter doesnt work with amp out of the box as the server.properties doesnt line up with the one created by amp. Would be great to let serverstarter check for a server.properties file first and use that instead of creating its own and copy it over or something if needed.

Minor Problem: AMP has a "Stop" button the stop the application, though serverstarter doesnt handle that very well and thinks something crashed (or something?) and restarts the server after 10 seconds, so i have to kill the application after stopping it. This is a minor inconvinience as its not a problem to press the same button twice in 10 seconds, though its still not great, especially for new users who dont know about this behavior and end up stopping a server and silently it restarts itself. So would be great to be able to disable this functionallity by default.

If further information is needed, i am happy to help

BloodWorkXGaming commented 2 years ago

Hey :) Thanks for the kind words!

Both issues should be fixable with two small config changes: For the Major Problem you should just be able to set baseInstallPath: ~ from baseInstallPath: setup/ For the minor problem you should be able to set the crashLimit: 10 to crashLimit: 1 to lower the amount of consecutive restarts, if that is desired behavior and auto-restart is handled within AMP

Joly0 commented 2 years ago

Thanks for fast and good advice, i am going to try that out.

Joly0 commented 2 years ago

Hey, this is a follow up to my previous message. I have changed the settings and both problems are solved, though it would be great to have certain settings like those in a separate settings file with normal default values, so its just modpack configs in the server-setup-config.yaml, so there is no confusion for users, when they replace the yaml with a new one to update a modpack and those settings are reset to the ones set by the modpack author

Joly0 commented 2 years ago

Btw there is another annoying issue with serverstarter and amp: Using amp´s stop button while the server is starting stops serverstarter, but doesnt stop the server from starting which leads to a weird behaviour within amp showing the server as stopped but console output keeps going