MCPcopy
hub / github.com/pyload/pyload / conf_web

Method conf_web

module/setup.py:299–332  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

297
298
299 def conf_web(self):
300 print ""
301 print _("## Webinterface Setup ##")
302
303 print ""
304 self.config["webinterface"]["activated"] = self.ask(_("Activate webinterface?"), self.yes, bool=True)
305 print ""
306 print _("Listen address, if you use 127.0.0.1 or localhost, the webinterface will only accessible locally.")
307 self.config["webinterface"]["host"] = self.ask(_("Address"), "0.0.0.0")
308 self.config["webinterface"]["port"] = self.ask(_("Port"), "8000")
309 print ""
310 print _("pyLoad offers several server backends, now following a short explanation.")
311 print "builtin:", _("Default server, best choice if you dont know which one to choose.")
312 print "threaded:", _("This server offers SSL and is a good alternative to builtin.")
313 print "fastcgi:", _(
314 "Can be used by apache, lighttpd, requires you to configure them, which is not too easy job.")
315 print "lightweight:", _("Very fast alternative written in C, requires libev and linux knowlegde.")
316 print "\t", _("Get it from here: https://github.com/jonashaag/bjoern, compile it")
317 print "\t", _("and copy bjoern.so to module/lib")
318
319 print ""
320 print _(
321 "Attention: In some rare cases the builtin server is not working, if you notice problems with the webinterface")
322 print _("come back here and change the builtin server to the threaded one here.")
323
324 self.config["webinterface"]["server"] = self.ask(_("Server"), "builtin",
325 ["builtin", "threaded", "fastcgi", "lightweight"])
326
327 print ""
328 print _("pyLoad offers several web user interface templates, please choose a webinterface template you like.")
329
330 templates = [t for t in os.listdir(os.path.join(pypath, "module", "web", "templates"))
331 if os.path.isdir(os.path.join(pypath, "module", "web", "templates", t))]
332 self.config["webinterface"]["template"] = self.ask(_("Template"), "modern", templates)
333
334 def conf_ssl(self):
335 print ""

Callers 1

startMethod · 0.95

Calls 3

askMethod · 0.95
joinMethod · 0.80
_Function · 0.50

Tested by

no test coverage detected