| opendj-server-legacy/resource/debian/control/postinst | ●●●●● patch | view | raw | blame | history | |
| opendj-server-legacy/resource/debian/control/postrm | ●●●●● patch | view | raw | blame | history | |
| opendj-server-legacy/resource/debian/control/preinst | ●●●●● patch | view | raw | blame | history | |
| opendj-server-legacy/resource/debian/control/prerm | ●●●●● patch | view | raw | blame | history | |
| opendj-server-legacy/resource/rpm/specs/postinstall.sh | ●●●●● patch | view | raw | blame | history | |
| opendj-server-legacy/resource/rpm/specs/postuninstall.sh | ●●●●● patch | view | raw | blame | history | |
| opendj-server-legacy/resource/rpm/specs/preinstall.sh | ●●●●● patch | view | raw | blame | history | |
| opendj-server-legacy/resource/rpm/specs/preuninstall.sh | ●●●●● patch | view | raw | blame | history |
opendj-server-legacy/resource/debian/control/postinst
@@ -28,48 +28,43 @@ set -e # Post install script # Install is launched with an empty second arg. # If the package is already installed, # the second arg. is not empty. # If the package is already installed, the second arg. is not empty. # Registers the service update-rc.d opendj defaults # Symlinks to process ID test -h "/var/run/opendj.pid" || ln -s ${deb.prefix}/logs/server.pid /var/run/opendj.pid # In this case, we are in upgrade mode. if [ "$1" = "configure" ] && [ ! -z "$2" ] then # For being secure, we check the buildinfo file too. if [ -f ${deb.prefix}/config/buildinfo ] then echo *Starting upgrade... ${deb.prefix}/./upgrade -n --acceptLicense echo # Upgrade fails - Requires mandatory user interaction. # Nevertheless, exits successfully of the pkg process. if [ "$?" -eq 2 ] then exit 0 fi # Restarts the service if needed. # If server is stopped by upgrade process, # the server will restart after upgrade. # If server is stopped before the upgrade process # (eg. upgrade the new package), the server will not restart. # Uses the flag for determining server status at this point. if [ "$?" -eq 0 ] then if [ -f ${deb.prefix}/logs/status ] then if [ "$1" = "configure" ] && [ ! -z "$2" ] ; then # For being secure, we check the buildinfo file too. if [ -f ${deb.prefix}/config/buildinfo ] ; then echo *Starting upgrade... ${deb.prefix}/./upgrade -n --acceptLicense echo echo "*Restarting server..." ${deb.prefix}/./bin/start-ds rm -f ${deb.prefix}/logs/status fi if [ "$?" -eq 2 ] ; then # Upgrade fails - Requires mandatory user interaction. # Nevertheless, exits successfully of the pkg process. exit 0 fi if [ "$?" -eq 0 ] ; then # Restarts the service if needed. # If server is stopped by upgrade process, the server will restart after upgrade. # If server is stopped before the upgrade process (eg. upgrade the new package), the server will not restart. # Uses the flag for determining server status at this point. if [ -f ${deb.prefix}/logs/status ] ; then echo echo "*Restarting server..." ${deb.prefix}/./bin/start-ds rm -f ${deb.prefix}/logs/status fi fi else echo "Invalid installation, could not find the build info file." exit -1 fi else # Invalid installation, could not find the buildinfo file. echo "Invalid installation, could not find the build info file." exit -1 fi fi # End post install script echo opendj-server-legacy/resource/debian/control/postrm
@@ -27,11 +27,10 @@ set -e # Post rm script # Files are removed automatically by pm. if [ "$1" = "remove" ] then # Files are removed automatically by pm. if [ "$1" = "remove" ] ; then echo echo *OpenDJ successfully removed fi echo echo # End of the post rm script opendj-server-legacy/resource/debian/control/preinst
@@ -26,23 +26,21 @@ # set -e # Pre installation script if [ "$1" = "upgrade" ] then # Only if the instance has been configured if [ -f ${deb.prefix}/config/buildinfo ] && [ "$(ls -A ${deb.prefix}/config/archived-configs)" ] then # If the server is running before upgrade, creates a flag. if [ -f ${deb.prefix}/logs/server.pid ] then touch ${deb.prefix}/logs/status if [ "$1" = "upgrade" ] ; then # Only if the instance has been configured if [ -f ${deb.prefix}/config/buildinfo ] && [ "$(ls -A ${deb.prefix}/config/archived-configs)" ] ; then # If the server is running before upgrade, creates a flag. if [ -f ${deb.prefix}/logs/server.pid ] ; then touch ${deb.prefix}/logs/status fi echo *Stopping OpenDJ server... ${deb.prefix}/bin/./stop-ds else echo "Instance is not configured. Upgrade aborded." exit -1 fi echo *Stopping OpenDJ server... ${deb.prefix}/bin/./stop-ds else echo "Instance is not configured. Upgrade aborded." exit -1 fi fi echo # End of the pre installation script opendj-server-legacy/resource/debian/control/prerm
@@ -27,16 +27,17 @@ set -e # Pre rm script # Stops the service. /etc/init.d/opendj stop >/dev/null 2>&1 # Deletes the service. update-rc.d -f opendj remove # Unlink the symlink to the process ID if it exists. test -h "/var/run/opendj.pid" && unlink /var/run/opendj.pid # Stops the server # Only if the instance has been configured if [ "$1" = "remove" ] && ( [ -f ${deb.prefix}/config/buildinfo ] && [ "$(ls -A ${deb.prefix}/config/archived-configs)" ] ) then # Stops the server if the instance has been configured if [ "$1" = "remove" ] && ( [ -f ${deb.prefix}/config/buildinfo ] && [ "$(ls -A ${deb.prefix}/config/archived-configs)" ] ) ; then echo *Stopping OpenDJ server... ${deb.prefix}/bin/./stop-ds fi opendj-server-legacy/resource/rpm/specs/postinstall.sh
@@ -34,29 +34,27 @@ # Registers the service /sbin/chkconfig --add opendj # Symlinks to process ID test -h "/var/run/opendj.pid" || ln -s /opt/opendj/logs/server.pid /var/run/opendj.pid if [ "$1" == "1" ] ; then echo "Post Install - initial install" else if [ "$1" == "2" ] ; then echo "Post Install - upgrade install" # Only if the instance has been configured if [ -e "%{_prefix}"/config/buildinfo ] && [ "$(ls -A "%{_prefix}"/config/archived-configs)" ] then # 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 if [ "$?" == "0" ] ; then # Checks the server status flag for restart. if [ -f "%{_prefix}"/logs/status ] then echo "" echo "Restarting server..." "%{_prefix}"/./bin/start-ds echo "" rm -f "%{_prefix}"/logs/status fi # If upgrade is ok, checks the server status flag for restart if [ "$?" == "0" ] && [ -f "%{_prefix}"/logs/status ] ; then echo "" echo "Restarting server..." "%{_prefix}"/./bin/start-ds echo "" rm -f "%{_prefix}"/logs/status fi # Upgrade fails, needs user interaction (eg. manual mode) # Upgrade fails, needs user interaction (eg. manual mode) if [ "$?" == "2" ] ; then exit "0" fi opendj-server-legacy/resource/rpm/specs/postuninstall.sh
@@ -28,8 +28,7 @@ # RPM Post Uninstall Script (%postun) # =================================== # If the first argument to %preun and %postun is 0, the action is # uninstallation. # If the first argument to %preun and %postun is 0, the action is uninstallation. # If the first argument to %preun and %postun is 1, the action is an upgrade. if [ "$1" == "0" ] ; then opendj-server-legacy/resource/rpm/specs/preinstall.sh
@@ -28,20 +28,17 @@ # RPM Pre Install Script (%pre) # ============================= # If the first argument to %pre is 1, the RPM operation is an initial # installation. If the argument to %pre is 2, the operation is an upgrade # from an existing version to a new one. # If the first argument to %pre is 1, the RPM operation is an initial installation. # If the argument to %pre is 2, the operation is an upgrade from an existing version to a new one. if [ "$1" == "1" ]; then echo "Pre Install - initial install" else if [ "$1" == "2" ] ; then # Only if the instance has been configured if [ -e "%{_prefix}"/config/buildinfo ] && [ "$(ls -A "%{_prefix}"/config/archived-configs)" ] then # Only if the instance has been configured 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 if [ -f "%{_prefix}"/logs/server.pid ] then # If the server is running before upgrade, creates a file flag if [ -f "%{_prefix}"/logs/server.pid ] ; then touch "%{_prefix}"/logs/status fi "%{_prefix}"/bin/./stop-ds opendj-server-legacy/resource/rpm/specs/preuninstall.sh
@@ -28,21 +28,19 @@ # RPM Pre Uninstall Script (%preun) # ================================= # If the first argument to %preun and %postun is 0, the action is # uninstallation. # If the first argument to %preun and %postun is 0, the action is uninstallation. # If the first argument to %preun and %postun is 1, the action is an upgrade. if [ "$1" == "0" ] ; then echo "Pre Uninstall - uninstall" # Stops the service and delete it. # Stops the service and delete it. /etc/init.d/opendj stop >/dev/null 2>&1 /sbin/chkconfig --del opendj # Unlink the symlink to the process ID. test -h "/var/run/opendj.pid" && unlink /var/run/opendj.pid # Only if the instance has been configured if [ -e "%{_prefix}"/config/buildinfo ] && [ "$(ls -A "%{_prefix}"/config/archived-configs)" ] then "%{_prefix}"/bin/./stop-ds # Only if the instance has been configured if [ -e "%{_prefix}"/config/buildinfo ] && [ "$(ls -A "%{_prefix}"/config/archived-configs)" ] ; then "%{_prefix}"/bin/./stop-ds fi else if [ "$1" == "1" ] ; then echo "Pre Uninstall - upgrade uninstall"