In an egg replacer putting `[]` will cause it to not be split at the first dot.
Before this change putting `"find": { "/Script/Engine.GameSession.MaxPlayers": "<DATA>" }`
would make the section name `/Script/Engine` and the key `GameSession.MaxPlayers`. After
this change, the same behavior occurs, but if you wrap the key in `[]` it will set the
section name properly, for example `"find": { "[/Script/Engine.GameSession].MaxPlayers": "<DATA>" }`
would make the sesion name `/Script/Engine.GameSession` and the key `MaxPlayers`.
Closes https://github.com/pterodactyl/panel/issues/2533
Prior to this logic not only was the error response incorrect for events, but we registered event listeners before the authentication event; so if auth failed we flooded the socket with tons of output that was never going to be sent anyways.
This change now waits to register listeners until the socket is fully authenticated and we're guaranteed to have a token present.
If wings is restarted while a container is already running, the server will be missing it's
configuration, specifically it's stop configuration. This will cause the stop power action
to terminate the server due to no stop command being set.
* Adding RPM specfile.
* Added systemd service and some scripting to make things nicer
* Updated systemd service.
* Updated for 1.5.0 and fixed mistake with license.
This also fixes an improperly written server deletion listener to look at the correct context cancelation.
Theoretically this should help address the issues in pterodactyl/panel#3596 but I'm not really sure how that happens, and theres no steps for reproduction.
* Cleanup server sync logic to work in a single consistent format
Previously we had a mess of a function trying to update server details from a patch request. This change just centralizes everything to a single Sync() call when a server needs to update itself.
We can also eventually update the panel (in V2) to not hit the patch endpoint, rather it can just be a generic endpoint that is hit after a server is updated on the Panel that tells Wings to re-sync the data to get the environment changes on the fly.
The changes I made to the patch function currently act like that, with a slightly fragile 2 second wait to let the panel persist the changes since I don't want this to be a breaking change on that end.
* Remove legacy server patch endpoint; replace with simpler sync endpoint
* Expose 8080 so that reverse-proxies like jwilder/nginx-proxy can pick up on it.
* Now actually patching the right image....
Co-authored-by: Dane Everitt <dane@daneeveritt.com>
If you have two env variables (for example ONE_VARIABLE and ONE_VARIABLE_NAME) ONE_VARIABLE_NAME has prefix ONE_VARIABLE and will be skipped.
Co-authored-by: Jakob <dev@schrej.net>