How detect shutdown of a dedicated server application?

For the client, the closing of the game client can be detect in the shoutdown event in the gameInstance, is there something similar for the server?

The only thing that comes to mind is a crutch solution such as a sub process that checks if the server process is running …
Is there a more adequate solution?

UGameEngine :: PreExit ()
called only at client closing, when closing server - not…