How to close Linux Dedicated Server in an elegant way?

I want close my linux dedicated server when game over for do not need the dedicated server any more, and I closed my dedicated server use “kill -9 pid”, it is a rough way, is there an elegant way to stop it ? Make sure the dedicated server released all resources which allocated before, contain the network resources?

I changed “kill -9 pid” to “kill -2 pid”, it seems more reasonable!

SIGINT is indeed a “default” way to make dedicated server quit, but in general logic like this is game-specific - e.g. you may want your master server to start/stop match servers.

I’m using Ctrl+C and in the log “Shutting down and abandoning modules” as in the window when quit command