From 9bd2c65409cbd3e63018cc65e90c008c1bfb5d8f Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Wed, 11 Mar 2015 12:30:51 +0000
Subject: [PATCH] OPENDJ-1772: Avoid double server stop in rpm package uninstall
---
opendj-server-legacy/resource/rpm/specs/preuninstall.sh | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/opendj-server-legacy/resource/rpm/specs/preuninstall.sh b/opendj-server-legacy/resource/rpm/specs/preuninstall.sh
index 5066592..fc5174f 100644
--- a/opendj-server-legacy/resource/rpm/specs/preuninstall.sh
+++ b/opendj-server-legacy/resource/rpm/specs/preuninstall.sh
@@ -33,15 +33,17 @@
if [ "$1" == "0" ] ; then
echo "Pre Uninstall - uninstall"
- # Stops the service and delete it.
- /etc/init.d/opendj stop >/dev/null 2>&1
- /sbin/chkconfig --del opendj
# Unlink the symlink to the process ID.
test -h "/var/run/opendj.pid" && unlink /var/run/opendj.pid
# Only if the instance has been configured
if [ -e "%{_prefix}"/config/buildinfo ] && [ "$(ls -A "%{_prefix}"/config/archived-configs)" ] ; then
"%{_prefix}"/bin/./stop-ds
fi
+
+ if [ -e /etc/init.d/opendj ] ; then
+ # Deletes the service.
+ /sbin/chkconfig --del opendj
+ fi
else if [ "$1" == "1" ] ; then
echo "Pre Uninstall - upgrade uninstall"
fi
--
Gitblit v1.10.0