summaryrefslogtreecommitdiff
path: root/plinth.py
diff options
context:
space:
mode:
authorNick Daly <Nick.M.Daly@gmail.com>2012-09-23 18:32:16 -0500
committerNick Daly <Nick.M.Daly@gmail.com>2012-09-23 18:32:16 -0500
commit3ef8e8bbc25854a699b386d57497dd5c93f20c20 (patch)
tree45c00a2f1718ff9967d6faa4f3f81d907adf96cd /plinth.py
parent82df0a800d3894bb35eae3d53a57b508b4b4803f (diff)
Customize host in cfg.py.
We start with a default of 127.0.0.1, because anything else is stupid. Change to 0.0.0.0 to serve to everybody.
Diffstat (limited to 'plinth.py')
-rwxr-xr-xplinth.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/plinth.py b/plinth.py
index adab110..5cdce88 100755
--- a/plinth.py
+++ b/plinth.py
@@ -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()