summaryrefslogtreecommitdiffstats
path: root/base/server/python
diff options
context:
space:
mode:
Diffstat (limited to 'base/server/python')
-rw-r--r--base/server/python/pki/server/deployment/pkihelper.py5
-rw-r--r--base/server/python/pki/server/deployment/pkiparser.py12
-rw-r--r--base/server/python/pki/server/deployment/scriptlets/instance_layout.py12
-rw-r--r--base/server/python/pki/server/deployment/scriptlets/slot_substitution.py8
4 files changed, 27 insertions, 10 deletions
diff --git a/base/server/python/pki/server/deployment/pkihelper.py b/base/server/python/pki/server/deployment/pkihelper.py
index 1be984d12..0145b4926 100644
--- a/base/server/python/pki/server/deployment/pkihelper.py
+++ b/base/server/python/pki/server/deployment/pkihelper.py
@@ -1818,7 +1818,10 @@ class File:
except KeyError:
# undefined parameter, skip
- pass
+ config.pki_log.debug(
+ 'ignoring slot [%s]',
+ line[begin:end + 1],
+ extra=config.PKI_INDENTATION_LEVEL_3)
# find the next parameter in the remainder of the line
begin = line.find('[', end + 1)
diff --git a/base/server/python/pki/server/deployment/pkiparser.py b/base/server/python/pki/server/deployment/pkiparser.py
index fb569d0d7..b1fc21310 100644
--- a/base/server/python/pki/server/deployment/pkiparser.py
+++ b/base/server/python/pki/server/deployment/pkiparser.py
@@ -170,9 +170,18 @@ class PKIConfigParser:
def init_config(self):
+ java_home = subprocess.check_output(
+ '. /usr/share/pki/etc/pki.conf && . /etc/pki/pki.conf '
+ '&& echo $JAVA_HOME',
+ shell=True)
+ java_home = java_home.decode(sys.getfilesystemencoding())
+ # workaround for pylint error E1103
+ java_home = java_home.strip()
+
# RESTEasy
resteasy_lib = subprocess.check_output(
- '. /etc/pki/pki.conf && echo $RESTEASY_LIB',
+ '. /usr/share/pki/etc/pki.conf && . /etc/pki/pki.conf '
+ '&& echo $RESTEASY_LIB',
shell=True)
resteasy_lib = resteasy_lib.decode(sys.getfilesystemencoding())
# workaround for pylint error E1103
@@ -203,6 +212,7 @@ class PKIConfigParser:
'pki_subsystem': config.pki_subsystem,
'pki_subsystem_type': config.pki_subsystem.lower(),
'pki_root_prefix': config.pki_root_prefix,
+ 'java_home': java_home,
'resteasy_lib': resteasy_lib,
'jni_jar_dir': jni_jar_dir,
'home_dir': os.path.expanduser("~"),
diff --git a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
index 98d82ff98..57f8537e0 100644
--- a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
+++ b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
@@ -55,6 +55,18 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
deployer.mdict['pki_instance_configuration_path'],
ignore_cb=file_ignore_callback_src_server)
+ # create /etc/sysconfig/<instance>
+ deployer.file.copy_with_slot_substitution(
+ deployer.mdict['pki_source_tomcat_conf'],
+ deployer.mdict['pki_target_tomcat_conf_instance_id'],
+ uid=0, gid=0, overwrite_flag=True)
+
+ # create /var/lib/pki/<instance>/conf/tomcat.conf
+ deployer.file.copy_with_slot_substitution(
+ deployer.mdict['pki_source_tomcat_conf'],
+ deployer.mdict['pki_target_tomcat_conf'],
+ overwrite_flag=True)
+
# Deploy ROOT web application
deployer.deploy_webapp(
"ROOT",
diff --git a/base/server/python/pki/server/deployment/scriptlets/slot_substitution.py b/base/server/python/pki/server/deployment/scriptlets/slot_substitution.py
index 1e85e44da..462a682f7 100644
--- a/base/server/python/pki/server/deployment/scriptlets/slot_substitution.py
+++ b/base/server/python/pki/server/deployment/scriptlets/slot_substitution.py
@@ -61,14 +61,6 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
deployer.mdict['pki_source_context_xml'],
deployer.mdict['pki_target_context_xml'],
overwrite_flag=True)
- deployer.file.copy_with_slot_substitution(
- deployer.mdict['pki_source_tomcat_conf'],
- deployer.mdict['pki_target_tomcat_conf_instance_id'],
- uid=0, gid=0, overwrite_flag=True)
- deployer.file.copy_with_slot_substitution(
- deployer.mdict['pki_source_tomcat_conf'],
- deployer.mdict['pki_target_tomcat_conf'],
- overwrite_flag=True)
if deployer.mdict['pki_subsystem'] == "CA":
deployer.file.copy_with_slot_substitution(