Sanae6 / SmoOnlineServer

Official server for Super Mario Odyssey: Online
https://discord.gg/jYCueK2BqD
108 stars 27 forks source link

Added restart server command #19

Closed TheUbMunster closed 2 years ago

TheUbMunster commented 2 years ago

"restartserver" restarts the server in-place (doesn't close & reopen console window, but does logically restart the program.)

TheUbMunster commented 2 years ago

pending testing on non-windows

TheUbMunster commented 2 years ago

While I do approve of this solution, and I see the reason for this implementation, I also don't particularly like the idea of restarting the server internally. This feels like something which should kill the server and depend on an external process to restart it, whether that be pm2, docker, or our own wrapper process.

Probably best to do as you say, however, I found it useful (and it was quite simple to write this way) as the purpose of this was to be able to restart the server remotely whenever buggy stuff happens. e.g., couple of days ago testing on build that piplup was hosting, but he was away for awhile so if something went wrong I could restart it myself with a simple command. If you'd rather, I can make the command start up a second process, kill the server, then have the second process restart the server, then kill itself.

Sanae6 commented 2 years ago

I think it's still fine that it's in the server, others who don't use the solutions I mentioned can simply use this.