diff --git a/.github/workflows/server-basic-test.yml b/.github/workflows/server-basic-test.yml index 6ca9a918702..dea38c2291d 100644 --- a/.github/workflows/server-basic-test.yml +++ b/.github/workflows/server-basic-test.yml @@ -97,6 +97,11 @@ jobs: run: | docker exec pki cat /etc/pki/pki-tomcat/server.xml + - name: Check pki-tomcat tomcat.conf + if: always() + run: | + docker exec pki cat /etc/pki/pki-tomcat/tomcat.conf + - name: Check pki-tomcat server logs dir after installation run: | # check file types, owners, and permissions @@ -299,6 +304,11 @@ jobs: run: | docker exec pki cat /var/lib/tomcats/pki/conf/server.xml + - name: Check tomcat@pki tomcat.conf + if: always() + run: | + docker exec pki cat /var/lib/tomcats/pki/conf/tomcat.conf + - name: Check tomcat@pki server logs dir after installation run: | # check file types, owners, and permissions diff --git a/base/server/python/pki/server/__init__.py b/base/server/python/pki/server/__init__.py index 0feae9cb0ff..e1315617320 100644 --- a/base/server/python/pki/server/__init__.py +++ b/base/server/python/pki/server/__init__.py @@ -771,6 +771,7 @@ def create(self, force=False): self.create_web_xml(exist_ok=True) # copy /etc/tomcat/tomcat.conf + # to /var/lib/pki//conf/tomcat.conf self.copy( Tomcat.TOMCAT_CONF, self.tomcat_conf, @@ -784,21 +785,22 @@ def create(self, force=False): java_home = os.getenv('JAVA_HOME') tomcat_conf.set('JAVA_HOME', java_home) + # update CATALINA_BASE + tomcat_conf.set('CATALINA_BASE', self.base_dir) + # store current PKI version tomcat_conf.set('PKI_VERSION', pki.specification_version()) tomcat_conf.write() - service_conf = os.path.join(SYSCONFIG_DIR, 'tomcat') + # copy /var/lib/pki//conf/tomcat.conf + # to /etc/sysconfig/@ self.copy( - service_conf, + self.tomcat_conf, self.service_conf, exist_ok=True, force=force) - with open(self.service_conf, 'a', encoding='utf-8') as f: - print('CATALINA_BASE="%s"' % self.base_dir, file=f) - def create_conf_dir(self, exist_ok=False): if self._conf_dir: