summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2016-04-27 06:14:06 +0200
committerEndi S. Dewata <edewata@redhat.com>2016-05-03 02:55:21 +0200
commit01197f06577410cb6f5c9633ae2a95dc7cc562f7 (patch)
tree395f76d7c11445869aef8538e791df766d24e8d8
parentcc4ae760c4267dc0d8851d98198e69b833e2e8ab (diff)
downloadpki-01197f06577410cb6f5c9633ae2a95dc7cc562f7.tar.gz
pki-01197f06577410cb6f5c9633ae2a95dc7cc562f7.tar.xz
pki-01197f06577410cb6f5c9633ae2a95dc7cc562f7.zip
Moved code to create systemd link for Tomcat.
-rw-r--r--base/server/python/pki/server/deployment/scriptlets/configuration.py7
-rw-r--r--base/server/python/pki/server/deployment/scriptlets/instance_layout.py11
2 files changed, 11 insertions, 7 deletions
diff --git a/base/server/python/pki/server/deployment/scriptlets/configuration.py b/base/server/python/pki/server/deployment/scriptlets/configuration.py
index 23f32b452..8f4a69d58 100644
--- a/base/server/python/pki/server/deployment/scriptlets/configuration.py
+++ b/base/server/python/pki/server/deployment/scriptlets/configuration.py
@@ -39,12 +39,6 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
def spawn(self, deployer):
- # ALWAYS establish the following Tomcat instance symbolic link since
- # this link is required by both automatic pkispawn instance
- # configuration as well as manual browser GUI instance configuration
- deployer.symlink.create(deployer.mdict['pki_systemd_service'],
- deployer.mdict['pki_systemd_service_link'])
-
if config.str2bool(deployer.mdict['pki_skip_configuration']):
config.pki_log.info(log.SKIP_CONFIGURATION_SPAWN_1, __name__,
extra=config.PKI_INDENTATION_LEVEL_1)
@@ -262,4 +256,3 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
if len(deployer.instance.tomcat_instance_subsystems()) == 1:
if deployer.directory.exists(deployer.mdict['pki_client_dir']):
deployer.directory.delete(deployer.mdict['pki_client_dir'])
- deployer.symlink.delete(deployer.mdict['pki_systemd_service_link'])
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 2af86bfeb..80f53f61b 100644
--- a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
+++ b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
@@ -293,12 +293,20 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
deployer.mdict['pki_symkey_jar'],
deployer.mdict['pki_symkey_jar_link'])
+ # ALWAYS establish the following Tomcat instance symbolic link since
+ # this link is required by both automatic pkispawn instance
+ # configuration as well as manual browser GUI instance configuration
+ deployer.symlink.create(deployer.mdict['pki_systemd_service'],
+ deployer.mdict['pki_systemd_service_link'])
+
def destroy(self, deployer):
config.pki_log.info(log.INSTANCE_DESTROY_1, __name__,
extra=config.PKI_INDENTATION_LEVEL_1)
+ # if there is no subsystem left in the instance
if len(deployer.instance.tomcat_instance_subsystems()) == 0:
+
# remove Tomcat instance base
deployer.directory.delete(deployer.mdict['pki_instance_path'])
# remove Tomcat instance logs
@@ -319,6 +327,9 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
deployer.directory.delete(
deployer.mdict['pki_instance_type_registry_path'])
+ # remove Tomcat's systemd service link
+ deployer.symlink.delete(deployer.mdict['pki_systemd_service_link'])
+
# Callback only when the /usr/share/pki/server/conf directory
# Is getting copied to the etc tree.