| | |
| | | # Software Licenced Under |
| | | License: CDDL |
| | | # RPM Group |
| | | Group: Applications/Network |
| | | Group: Productivity/Networking/LDAP/Servers |
| | | # Link to Application web site |
| | | URL: [[ referenceURL ]] |
| | | # Distributing Organisation |
| | |
| | | echo "Pre Install - initial install" |
| | | else if [ "$1" == "2" ] ; then |
| | | # Only if the instance has been configured |
| | | if [ isInstanceConfigured ] |
| | | if [ -e "%{_prefix}"/config/buildinfo ] && [ "$(ls -A "%{_prefix}"/config/archived-configs)" ] |
| | | then |
| | | echo "Pre Install - upgrade install" |
| | | # If the server is running before upgrade, creates a file flag |
| | |
| | | echo "Post Install - initial install" |
| | | else if [ "$1" == "2" ] ; then |
| | | echo "Post Install - upgrade install" |
| | | # Only if the instance has been configured |
| | | if [ isInstanceConfigured ] |
| | | # Only if the instance has been configured |
| | | if [ -e "%{_prefix}"/config/buildinfo ] && [ "$(ls -A "%{_prefix}"/config/archived-configs)" ] |
| | | then |
| | | "%{_prefix}"/./upgrade -n --acceptLicense |
| | | # Upgrade ok |
| | |
| | | %preun |
| | | if [ "$1" == "0" ] ; then |
| | | echo "Pre Uninstall - uninstall" |
| | | # Only if the instance has been configured |
| | | if [ isInstanceConfigured ] |
| | | # Only if the instance has been configured |
| | | if [ -e "%{_prefix}"/config/buildinfo ] && [ "$(ls -A "%{_prefix}"/config/archived-configs)" ] |
| | | then |
| | | "%{_prefix}"/bin/./stop-ds |
| | | fi |
| | |
| | | fi |
| | | fi |
| | | |
| | | # ------------------------- |
| | | # Returns true/0 if the instance has been configured. |
| | | isInstanceConfigured() { |
| | | if [ -f "%{_prefix}"/config/buildinfo ] && [ "$(ls -A "%{_prefix}"/config/archived-configs)" ] |
| | | then |
| | | return 0 |
| | | else |
| | | return 1 |
| | | fi |
| | | } |
| | | # ========================= |
| | | # Files section |
| | | # ========================= |