There should be a proper endpoint that allows restarting the server, possibly integrating with an existing Sponge plugin.