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