[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Pki-devel] [PATCH] 257 - check for correct symlinks on startup with nuxwdog



pkidaemon checks the systemd symlinks on startup.
Right now, it is looking for the wrong symlinks when nuxwdog is
enabled, and preventing the server from coming up.

This patch fixes this.

Please review,
Ade

https://bugzilla.redhat.com/show_bug.cgi?id=1226025
>From 50cd86f842169aabdf6312b647db46459e5e469b Mon Sep 17 00:00:00 2001
From: Ade Lee <alee redhat com>
Date: Thu, 28 May 2015 15:29:35 -0400
Subject: [PATCH] BZ1226025 -  pkidaemon script checks for wrong symlinks for
 nuxwdog startup

Fixed startup script to account for nuxwdog
---
 base/server/scripts/operations | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/base/server/scripts/operations b/base/server/scripts/operations
index 09b35bf126c95a795519251b54646e1e0dcef107..90ba4ed484ce25062a250d985c78ffbca61fe3a7 100644
--- a/base/server/scripts/operations
+++ b/base/server/scripts/operations
@@ -1098,16 +1098,23 @@ verify_symlinks()
         tomcat_dir="/usr/share/tomcat"
     fi
 
-    # Dogtag 10 Symbolic Link Target Variables
-    java_dir="/usr/share/java"
-    pki_systemd_service="pki-${PKI_WEB_SERVER_TYPE}d  service"
-    systemd_dir="/lib/systemd/system"
-
     # Dogtag 10 Symbolic Link Variables
+    java_dir="/usr/share/java"
     pki_common_jar_dir="${PKI_INSTANCE_PATH}/common/lib"
     pki_registry_dir="/etc/sysconfig/pki/${PKI_WEB_SERVER_TYPE}/${PKI_INSTANCE_NAME}"
-    pki_systemd_dir="/etc/systemd/system/pki-tomcatd.target.wants"
-    pki_systemd_link="pki-${PKI_WEB_SERVER_TYPE}d ${PKI_INSTANCE_NAME} service"
+
+    # Dogtag 10 Systemd variables
+    if [ "${STARTED_BY_SYSTEMD}" == "1" ]; then
+        pki_systemd_service="pki-${PKI_WEB_SERVER_TYPE}d-nuxwdog  service"
+        systemd_dir="/lib/systemd/system"
+        pki_systemd_dir="/etc/systemd/system/pki-tomcatd-nuxwdog.target.wants"
+        pki_systemd_link="pki-${PKI_WEB_SERVER_TYPE}d-nuxwdog ${PKI_INSTANCE_NAME} service"
+    else
+        pki_systemd_service="pki-${PKI_WEB_SERVER_TYPE}d  service"
+        systemd_dir="/lib/systemd/system"
+        pki_systemd_dir="/etc/systemd/system/pki-tomcatd.target.wants"
+        pki_systemd_link="pki-${PKI_WEB_SERVER_TYPE}d ${PKI_INSTANCE_NAME} service"
+    fi
 
     # '${PKI_INSTANCE_PATH}' symlinks
     base_symlinks=(
-- 
1.9.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]