Server Auto-Updater/Checker
#5
(02-11-2015, 09:23 PM)xoft Wrote: We can add an interface for the current version - at least for the Jenkins builds. There is already a scaffolding for that in place (MCSERVER_BUILD_ID et al.) Also the OS platform and version should be made available to plugins, so that the plugin knows what kind of executable to download.

Then, the plugin would be able to tell if there is an update or not, and it could also download the update.

One problematic thing is replacing the actual executable - on some OSes it is impossible to replace a program executable file while it is running. And re-starting the server afterwards will need some thinking, too - if none of your code is running, how do you start it automagically? Perhaps a per-OS-specific shell script could be made.

Also, in order for the updates to be at least reasonably safe from hackers, you'd need to use SSL for the download protection, some form of certificates to verify executable authenticity, otherwise hackers could fool your server into updating to their own hacked executable, doing whatever mischief. And on the lower level we need at least a client-side HTTP protocol implementation in Lua; the one provided in LuaSocket doesn't seem too usable for us, it's not event-driven.

I'd postpone such a plugin for now; I'm currently working on bringing SSL to Lua API and then perhaps HTTP client and server as well - the objects that the WebAdmin uses should be reusable enough here. Until then we could think about the problems above - replacing and rerunning the executable and certificate verification.

Another question to answer: should this plugin also do plugin updates? If so, we need the plugin repository and proper versioning, as well as querying the versions from the running plugins.

Or the plugin could just check for updates and tell you if there's a newer version in the server launcher window so that you know that there's a newer version and then you can get it yourself if you want to, something that basic should be possible right?
Reply
Thanks given by:


Messages In This Thread
Server Auto-Updater/Checker - by FrozdY - 02-11-2015, 08:53 PM
RE: Server Auto-Updater/Checker - by NiLSPACE - 02-11-2015, 09:01 PM
RE: Server Auto-Updater/Checker - by FrozdY - 02-11-2015, 09:13 PM
RE: Server Auto-Updater/Checker - by xoft - 02-11-2015, 09:23 PM
RE: Server Auto-Updater/Checker - by FrozdY - 02-11-2015, 10:09 PM
RE: Server Auto-Updater/Checker - by wudles - 02-13-2015, 06:58 AM
RE: Server Auto-Updater/Checker - by xoft - 02-13-2015, 07:05 AM
RE: Server Auto-Updater/Checker - by wudles - 02-13-2015, 07:09 AM



Users browsing this thread: 1 Guest(s)