Closed TheUbMunster closed 2 years ago
pending testing on non-windows
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.
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.
"restartserver" restarts the server in-place (doesn't close & reopen console window, but does logically restart the program.)