mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Gaetan Boismal
11.30.2015 ab1f8ae8e6113819e9c7ddd83eea69d9a9133dd8
opendj-server-legacy/resource/rpm/specs/preuninstall.sh
@@ -28,21 +28,19 @@
# RPM Pre Uninstall Script (%preun)
# =================================
# If the first argument to %preun and %postun is 0, the action is
#  uninstallation.
# If the first argument to %preun and %postun is 0, the action is uninstallation.
# If the first argument to %preun and %postun is 1, the action is an upgrade.
if [ "$1" == "0" ] ; then
    echo "Pre Uninstall - uninstall"
# Stops the service and delete it.
    # 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
    # Only if the instance has been configured
    if [ -e "%{_prefix}"/config/buildinfo ] && [ "$(ls -A "%{_prefix}"/config/archived-configs)" ] ; then
      "%{_prefix}"/bin/./stop-ds
    fi
else if [ "$1" == "1" ] ; then
    echo "Pre Uninstall - upgrade uninstall"