Browse Source

HPCC-19888 Stop hpcc-init/dafilersv on platforms using systemctl during uninstall

Signed-off-by: Michael Gardner <michael.gardner@lexisnexisrisk.net>

HPCC-19888 Allow for output of sysV stop commands at uninstall

Signed-off-by: Michael Gardner <michael.gardner@lexisnexisrisk.com>
Michael Gardner 7 years ago
parent
commit
d116d60415
1 changed files with 11 additions and 5 deletions
  1. 11 5
      initfiles/bash/etc/init.d/uninstall-init.in

+ 11 - 5
initfiles/bash/etc/init.d/uninstall-init.in

@@ -36,6 +36,16 @@ removeSymlink ()
     fi
 }
 
+/etc/init.d/hpcc-init stop
+/etc/init.d/dafilesrv stop
+
+if which systemctl 1>/dev/null 2>&1; then
+	if [ -e /etc/systemd/system/hpccsystems-platform.target ]; then
+		systemctl stop hpccsystems-platform.target
+        removeSymlink "/etc/systemd/system/hpccsystems-platform.target"
+    fi
+fi
+
 echo ""
 
 ## uninstalling files
@@ -62,10 +72,6 @@ if [ -d ${INSTALL_DIR}/etc/init.d/uninstall ]; then
 fi
 
 if which systemctl 1>/dev/null 2>&1; then
-	if [ -e /etc/systemd/system/hpccsystems-platform.target ]; then
-		systemctl stop hpccsystems-platform.target
-		removeSymlink "/etc/systemd/system/hpccsystems-platform.target"
-	fi
-	systemctl daemon-reload
+    systemctl daemon-reload
 	systemctl reset-failed
 fi