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