postrm revision 6238
6238N/A#!/bin/bash
6238N/Aset -e
6238N/A# POSTRM - Upgrade or remove script
6238N/Aif [ $1 == "remove" ] ; then
6238N/A# Removing the remaining files
6238N/A echo *OpenDJ successfully removed
6238N/Afi
6238N/Aif [ "$1" = "upgrade" ] ; then
6238N/A echo *Starting upgrade...
6238N/A @prefix@/./upgrade -n
6238N/A# Upgrade ok, restarts the server.
6238N/A if [ "$?" -eq 0 ] ; then
6238N/A @prefix@/./bin/start-ds
6238N/A fi
6238N/A# Upgrade fails - Needs user interaction
6238N/A if [ "$?" -eq 2 ] ; then
6238N/A exit 0
6238N/A fi
6238N/Afi
6238N/Aecho