preinst revision 6279
6253N/A#!/bin/bash
6238N/Aset -e
6253N/A# Pre installation script
6253N/Aif [ "$1" = "upgrade" ]
6253N/Athen
6279N/A# Only if the instance has been configured
6279N/A if [ -f @prefix@/config/buildinfo ] && [ "$(ls -A @prefix@/config/archived-configs)" ]
6253N/A then
6279N/A# If the server is running before upgrade, creates a flag.
6279N/A if [ -f @prefix@/logs/server.pid ]
6279N/A then
6279N/A touch @prefix@/logs/status
6279N/A fi
6279N/A echo *Stopping OpenDJ server...
6279N/A @prefix@/bin/./stop-ds
6279N/A else
6279N/A echo "Instance is not configured. Upgrade aborded."
6279N/A exit -1
6253N/A fi
6253N/Afi
6238N/Aecho
6253N/A# End of the pre installation script