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