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

Gaetan Boismal
11.30.2015 9a9ae38a98b5e00a1580ee89a534c36724b5ad34
OPENDJ-1772: Avoid double server stop in debian package uninstall
2 files modified
17 ■■■■■ changed files
opendj-server-legacy/resource/debian/control/postrm 6 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/resource/debian/control/prerm 11 ●●●● patch | view | raw | blame | history
opendj-server-legacy/resource/debian/control/postrm
@@ -29,8 +29,10 @@
# Post rm script
# Files are removed automatically by pm.
if [ "$1" = "remove" ] ; then
  echo
  echo *OpenDJ successfully removed
    # Deletes the service.
    update-rc.d -f opendj remove
    echo
    echo *OpenDJ successfully removed
fi
echo
# End of the post rm script
opendj-server-legacy/resource/debian/control/prerm
@@ -27,18 +27,11 @@
set -e
# Pre rm script
# Stops the service.
/etc/init.d/opendj stop >/dev/null 2>&1
# Deletes the service.
update-rc.d -f opendj remove
# Unlink the symlink to the process ID if it exists.
test -h "/var/run/opendj.pid" && unlink /var/run/opendj.pid
# Stops the server if the instance has been configured
if [ "$1" = "remove" ] && ( [ -f ${deb.prefix}/config/buildinfo ] && [ "$(ls -A ${deb.prefix}/config/archived-configs)" ] ) ; then
  echo *Stopping OpenDJ server...
  ${deb.prefix}/bin/./stop-ds
    ${deb.prefix}/bin/./stop-ds
fi
# End prem script