summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/etc/rhizi-server.conf.example1
-rw-r--r--res/rz-mux/rhizi-conf-template.d/rhizi-server.conf.jinja2
-rw-r--r--src/local/rz-mux/rz-mux-tool.py1
-rw-r--r--src/server/rz_config.py5
-rw-r--r--src/server/rz_server.py4
5 files changed, 7 insertions, 6 deletions
diff --git a/res/etc/rhizi-server.conf.example b/res/etc/rhizi-server.conf.example
index c96b62ef..73181645 100644
--- a/res/etc/rhizi-server.conf.example
+++ b/res/etc/rhizi-server.conf.example
@@ -9,6 +9,7 @@
#
#root_path =
#template_d_path
+template_d_relpath = fragment.d/template.d
development_mode = True
static_url_path = /static
diff --git a/res/rz-mux/rhizi-conf-template.d/rhizi-server.conf.jinja b/res/rz-mux/rhizi-conf-template.d/rhizi-server.conf.jinja
index 18084f50..2569a661 100644
--- a/res/rz-mux/rhizi-conf-template.d/rhizi-server.conf.jinja
+++ b/res/rz-mux/rhizi-conf-template.d/rhizi-server.conf.jinja
@@ -10,7 +10,7 @@
# General
#
root_path = {{ root_path }}
-template_d_path = {{ template_d_path }}
+template_d_relpath = fragment.d/template.d
development_mode = True
static_url_path = /static
diff --git a/src/local/rz-mux/rz-mux-tool.py b/src/local/rz-mux/rz-mux-tool.py
index f2b66c48..581ed164 100644
--- a/src/local/rz-mux/rz-mux-tool.py
+++ b/src/local/rz-mux/rz-mux-tool.py
@@ -84,7 +84,6 @@ def gen_dom_config__rhizi(domain_fqdn, cfg):
'rz_port__http': cfg.rz_port__http,
'rz_server_secret': rz_server_secret,
'user_db_path': user_db_path,
- 'template_d_path': 'template.d',
}),
Template_Task(os.path.join(rz_template_path_prefix, 'rhizi.init.jinja'),
os.path.join(install_prefix, 'etc/init.d/', 'rhizi__%s' % (domain_fqdn)),
diff --git a/src/server/rz_config.py b/src/server/rz_config.py
index 63ee1b5e..79741d99 100644
--- a/src/server/rz_config.py
+++ b/src/server/rz_config.py
@@ -41,9 +41,11 @@ class RZ_Config(object):
# └── bin
#    └── rz_server.py
#
+ # - template_d_relpath: root_path relative path to template dir
+ #
root_dir_default = os.path.join(os.path.dirname(__file__), '..')
cfg['root_path'] = root_dir_default
- cfg['template_d_path'] = os.path.join(root_dir_default, 'fragment.d', 'template.d')
+ cfg['template_d_relpath'] = 'fragment.d/template.d'
# client configuration
cfg['optimized_main'] = False
@@ -156,7 +158,6 @@ class RZ_Config(object):
# adjust paths
for path in ['config_dir',
'root_path',
- 'template_d_path',
'user_db_path']:
path_value = getattr(cfg, path)
if False == os.path.isabs(path_value):
diff --git a/src/server/rz_server.py b/src/server/rz_server.py
index 512a8b4a..3120fc28 100644
--- a/src/server/rz_server.py
+++ b/src/server/rz_server.py
@@ -255,8 +255,8 @@ def init_webapp(cfg, kernel):
#
webapp = FlaskExt(__name__,
static_folder='static',
- template_folder=cfg.template_d_path,
- static_url_path=cfg.static_url_path)
+ static_url_path=cfg.static_url_path,
+ template_folder=cfg.template_d_relpath)
webapp.config.from_object(cfg)
webapp.root_path = root_path # for some reason calling config.from_xxx() does not have effect
webapp.rz_config = cfg