diff options
-rw-r--r-- | cfg.sample.py | 1 | ||||
-rwxr-xr-x | plinth.py | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/cfg.sample.py b/cfg.sample.py index 799984a..ee57bb6 100644 --- a/cfg.sample.py +++ b/cfg.sample.py @@ -12,6 +12,7 @@ users_dir = os.path.join(data_dir, "users") product_name = "Plinth" box_name = "FreedomBox" +host = 127.0.0.1 port = 8000 ## Do not edit below this line ## @@ -54,7 +54,7 @@ class Root(plugin_mount.PagePlugin): raise cherrypy.InternalRedirect('/router') else: raise cherrypy.InternalRedirect('/help/about') - + def load_modules(): """Import all the symlinked .py files in the modules directory and all the .py files in directories linked in the modules directory @@ -121,7 +121,7 @@ def setup(): server.subscribe() # Configure default server - cherrypy.config.update({'server.socket_host': '127.0.0.1', + cherrypy.config.update({'server.socket_host': cfg.host, 'server.socket_port': cfg.port, 'server.thread_pool':10, 'tools.staticdir.root': cfg.file_root, @@ -130,7 +130,7 @@ def setup(): 'tools.sessions.storage_type':"file", 'tools.sessions.timeout':90, 'tools.sessions.storage_path':"%s/data/cherrypy_sessions" % cfg.file_root, - + }) config = {'/': {'tools.staticdir.root': '%s/static' % cfg.file_root, @@ -142,7 +142,7 @@ def setup(): } cherrypy.tree.mount(cfg.html_root, '/', config=config) cherrypy.engine.signal_handler.subscribe() - + def main(): setup() |