diff options
author | Endi S. Dewata <edewata@redhat.com> | 2015-04-24 12:52:22 -0400 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2015-04-24 13:13:03 -0400 |
commit | 74755982d17f2075e07c3afe7241ad081a01d2a8 (patch) | |
tree | f1f9c621208087c58bed28d78ed87c7c27f986c2 | |
parent | f6f3919592d50c1a8824422ee38a3e08f6124298 (diff) | |
download | pki-74755982d17f2075e07c3afe7241ad081a01d2a8.tar.gz pki-74755982d17f2075e07c3afe7241ad081a01d2a8.tar.xz pki-74755982d17f2075e07c3afe7241ad081a01d2a8.zip |
Fixed problem deploying without theme.
The deployment tool has been modified to deploy the pki.xml only
if the theme package is installed.
https://fedorahosted.org/pki/ticket/499
-rw-r--r-- | base/server/python/pki/server/deployment/scriptlets/instance_layout.py | 25 |
1 files changed, 13 insertions, 12 deletions
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 ebcedc2e0..8938057ae 100644 --- a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py +++ b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py @@ -49,8 +49,8 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet): # establish instance logs deployer.directory.create(deployer.mdict['pki_instance_log_path']) - # establish Tomcat instance configuration - # don't copy over the common ldif files to etc instance path + # copy /usr/share/pki/server/conf tree into /var/lib/pki/<instance>/conf + # except common ldif files and theme deployment descriptor deployer.directory.copy( deployer.mdict['pki_source_server_path'], deployer.mdict['pki_instance_configuration_path'], @@ -70,15 +70,16 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet): "localhost", "ROOT.xml")) - # Deploy theme web application - deployer.deploy_webapp( - "pki", - deployer.mdict['pki_theme_server_dir'], - os.path.join( - deployer.mdict['pki_source_server_path'], - "Catalina", - "localhost", - "pki.xml")) + if os.path.exists(deployer.mdict['pki_theme_server_dir']): + # Deploy theme web application if available + deployer.deploy_webapp( + "pki", + deployer.mdict['pki_theme_server_dir'], + os.path.join( + deployer.mdict['pki_source_server_path'], + "Catalina", + "localhost", + "pki.xml")) # Deploy admin templates deployer.deploy_webapp( @@ -333,5 +334,5 @@ def file_ignore_callback_src_server(src, names): config.pki_log.info(log.FILE_EXCLUDE_CALLBACK_2, src, names, extra=config.PKI_INDENTATION_LEVEL_1) - excludes = {'schema.ldif', 'database.ldif', 'manager.ldif'} + excludes = {'schema.ldif', 'database.ldif', 'manager.ldif', 'pki.xml'} return excludes |