I don't have the slightest clue on how to do this. What I'm imagining is what mad games used to do when loleris still put effort into it. For those of you who don't know what happened after he updated that game, it basically put a timer for 5 minutes telling everyone to rejoin the game, or the server will shut itself down when the timer reaches 0. This amazed me because I didn't know that studio could somehow communicate with a server that was using an outdated version of that game. At first I thought you would have to change a variable, but then I realized that the variable wouldn't change until the server reset.
i would imagine that you use a datastore, and every minute or so a script in the game would detetct if the current version stored in a datastore is different than the one stored in some value in the server, if there is a difference, shut the server down, presumably by kicking all players since a server with no players is shutdown automatically