mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
customization: Don't install files in /var/www
- Use the directory for service custom static files only if it exists. - This fixes issue with lintian complaining of installing files in /var/www. Closes #1399 Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
4 files changed
+56
-63
No files matched your search
+14
-9
@@ -115,16 +115,21 @@ def setup_server():
|
||||
|
||||
custom_static_dir = cfg.custom_static_dir
|
||||
custom_static_url = '/plinth/custom/static'
|
||||
config = {
|
||||
'/': {
|
||||
'tools.staticdir.root': custom_static_dir,
|
||||
'tools.staticdir.on': True,
|
||||
'tools.staticdir.dir': '.'
|
||||
if os.path.exists(custom_static_dir):
|
||||
config = {
|
||||
'/': {
|
||||
'tools.staticdir.root': custom_static_dir,
|
||||
'tools.staticdir.on': True,
|
||||
'tools.staticdir.dir': '.'
|
||||
}
|
||||
}
|
||||
}
|
||||
cherrypy.tree.mount(None, custom_static_url, config)
|
||||
logger.debug('Serving custom static directory %s on %s', custom_static_dir,
|
||||
custom_static_url)
|
||||
cherrypy.tree.mount(None, custom_static_url, config)
|
||||
logger.debug('Serving custom static directory %s on %s',
|
||||
custom_static_dir, custom_static_url)
|
||||
else:
|
||||
logger.debug(
|
||||
'Not serving custom static directory %s on %s, '
|
||||
'directory does not exist', custom_static_dir, custom_static_url)
|
||||
|
||||
js_dir = '/usr/share/javascript'
|
||||
js_url = '/javascript'
|
||||
|
||||
Reference in new issue
Block a user