Add support for SVR4 packages for OpenDJ. Package name is opendj. It's a single package and has integration with SMF.
Default installation is /usr/opendj.
Once packages are installed, root must run configure to setup the Instance location (/var/opendj) and owner.
And the owner must run setup.
| | |
| | | </javac> |
| | | </target> |
| | | |
| | | <!-- import file="build-svr4.xml"/ --> |
| | | <import file="build-svr4.xml"/> |
| | | |
| | | <!-- Copy NDB Backend dependencies to build lib directory --> |
| | | <target name="copyndbdeps" if="ismysqldirpresent" |
| | |
| | | # |
| | | # |
| | | # Copyright 2008-2010 Sun Microsystems, Inc. |
| | | # Portions Copyright 2010 ForgeRock AS |
| | | # Portions Copyright 2010-2011 ForgeRock AS |
| | | |
| | | # |
| | | # Display an error message |
| | |
| | | then |
| | | if [ -f "${INSTALL_ROOT}/configure" ] |
| | | then |
| | | if [ -f /etc/opends/instance.loc ] |
| | | if [ -f /etc/opendj/instance.loc ] |
| | | then |
| | | if [ "${SCRIPT_NAME}" = "configure" ] |
| | | then |
| | |
| | | exit 0 |
| | | fi |
| | | fi |
| | | read INSTANCE_ROOT < /etc/opends/instance.loc |
| | | read INSTANCE_ROOT < /etc/opendj/instance.loc |
| | | else |
| | | if [ "${SCRIPT_NAME}" != "configure" ] |
| | | then |
| | |
| | | # |
| | | # |
| | | # Copyright 2006-2009 Sun Microsystems, Inc. |
| | | # Portions Copyright 2011 ForgeRock AS |
| | | |
| | | |
| | | # Capture the current working directory so that we can change to it later. |
| | |
| | | SCRIPT_NAME="start-ds" |
| | | export SCRIPT_NAME |
| | | |
| | | # check for presence of lib/_svc-opends.sh file |
| | | # check for presence of lib/_svc-opendj.sh file |
| | | # If present, we should be on Solaris/OpenSolaris and use SMF to start |
| | | # OpenDS. |
| | | # Check --exec. If not present, start OpenDS from SMF |
| | | # OpenDJ. |
| | | # Check --exec. If not present, start OpenDJ from SMF |
| | | |
| | | if test -f "${INSTALL_ROOT}/lib/_svc-opends.sh" |
| | | if test -f "${INSTALL_ROOT}/lib/_svc-opendj.sh" |
| | | then |
| | | if [ "$1" = "--exec" ] |
| | | then |
| | |
| | | then |
| | | # these options are only used when trying to start the server |
| | | # In this case, start it through the service. |
| | | exec /usr/sbin/svcadm enable -t svc:/network/ldap/server:opends |
| | | exec /usr/sbin/svcadm enable -t svc:/network/ldap/server:opendj |
| | | fi |
| | | fi |
| | | |
| | |
| | | # |
| | | # |
| | | # Copyright 2006-2009 Sun Microsystems, Inc. |
| | | # Portions Copyright 2011 ForgeRock AS |
| | | |
| | | |
| | | # This script may be used to request that the Directory Server shut down. |
| | |
| | | SCRIPT_NAME="stop-ds" |
| | | export SCRIPT_NAME |
| | | |
| | | # check for presence of lib/_svc-opends.sh file |
| | | # check for presence of lib/_svc-opendj.sh file |
| | | # If present, we should be on Solaris/OpenSolaris and use SMF to start |
| | | # OpenDS. |
| | | # Check --exec. If not present, start OpenDS from SMF |
| | | if test -f "${INSTALL_ROOT}/lib/_svc-opends.sh" |
| | | # OpenDJ. |
| | | # Check --exec. If not present, start OpenDJ from SMF |
| | | if test -f "${INSTALL_ROOT}/lib/_svc-opendj.sh" |
| | | then |
| | | if [ "$1" = "--exec" ] |
| | | then |
| | |
| | | then |
| | | if [ "$1" = "-R" -o "$1" = "--restart" ] |
| | | then |
| | | /usr/sbin/svcadm disable -t svc:/network/ldap/server:opends |
| | | /usr/sbin/svcadm disable -t svc:/network/ldap/server:opendj |
| | | RETURN_CODE=$? |
| | | if test ${RETURN_CODE} -ne 0 |
| | | then |
| | | exit ${RETURN_CODE} |
| | | fi |
| | | exec /usr/sbin/svcadm enable -t svc:/network/ldap/server:opends |
| | | exec /usr/sbin/svcadm enable -t svc:/network/ldap/server:opendj |
| | | else |
| | | exec /usr/sbin/svcadm disable -t svc:/network/ldap/server:opends |
| | | exec /usr/sbin/svcadm disable -t svc:/network/ldap/server:opendj |
| | | fi |
| | | fi |
| | | fi |
| | |
| | | # |
| | | # |
| | | # Copyright 2006-2008 Sun Microsystems, Inc. |
| | | # Portions Copyright 2011 ForgeRock AS |
| | | |
| | | |
| | | # Capture the current working directory so that we can change to it later. |
| | |
| | | if test ${RETURN_CODE} -eq 0 |
| | | then |
| | | # Retrieve INSTANCE_ROOT |
| | | INSTANCE_ROOT=`cat /etc/opends/instance.loc` |
| | | INSTANCE_ROOT=`cat /etc/opendj/instance.loc` |
| | | # Now update SMF manifest, cp it to the right place and import it |
| | | OWNER=`ls -ld ${INSTANCE_ROOT}` |
| | | CURRENT_IFS=${IFS} |
| | |
| | | IFS=${CURRENT_IFS} |
| | | if test "${USERNAME}" = "ldap" -a "$GROUPNAME" = "ldap" |
| | | then |
| | | cp ${INSTALL_ROOT}/resources/opends-manifest.xml /var/svc/manifest/network/ldap/ |
| | | cp ${INSTALL_ROOT}/resources/opendj-manifest.xml /var/svc/manifest/network/ldap/ |
| | | else |
| | | cat ${INSTALL_ROOT}/resources/opends-manifest.xml | sed -e "s/user='ldap/user='${USERNAME}/;s/group='ldap/group='${GROUPNAME}/" > /tmp/opends-manifest.$$ |
| | | cp /tmp/opends-manifest.$$ /var/svc/manifest/network/ldap/opends-manifest.xml |
| | | rm /tmp/opends-manifest.$$ |
| | | cat ${INSTALL_ROOT}/resources/opendj-manifest.xml | sed -e "s/user='ldap/user='${USERNAME}/;s/group='ldap/group='${GROUPNAME}/" > /tmp/opendj-manifest.$$ |
| | | cp /tmp/opendj-manifest.$$ /var/svc/manifest/network/ldap/opendj-manifest.xml |
| | | rm /tmp/opendj-manifest.$$ |
| | | fi |
| | | /usr/sbin/svccfg import /var/svc/manifest/network/ldap/opends-manifest.xml |
| | | /usr/sbin/svccfg import /var/svc/manifest/network/ldap/opendj-manifest.xml |
| | | fi |
| | | exit ${RETURN_CODE} |
| | | fi |
| | |
| | | # |
| | | # |
| | | # Copyright 2008-2009 Sun Microsystems, Inc. |
| | | # Portions Copyright 2011 ForgeRock AS |
| | | |
| | | |
| | | # Capture the current working directory so that we can change to it later. |
| | |
| | | |
| | | echo "Disabling SMF service ..." |
| | | # Now update SMF manifest, delete it and remove the file from /var/svc/manifest |
| | | echo select network/ldap/server > /tmp/opends-unconfigure.$$ |
| | | echo delete opends >> /tmp/opends-unconfigure.$$ |
| | | /usr/sbin/svccfg -f /tmp/opends-unconfigure.$$ |
| | | rm /tmp/opends-unconfigure.$$ |
| | | rm /var/svc/manifest/network/ldap/opends-manifest.xml |
| | | echo select network/ldap/server > /tmp/opendj-unconfigure.$$ |
| | | echo delete opendj >> /tmp/opendj-unconfigure.$$ |
| | | /usr/sbin/svccfg -f /tmp/opendj-unconfigure.$$ |
| | | rm /tmp/opendj-unconfigure.$$ |
| | | rm /var/svc/manifest/network/ldap/opendj-manifest.xml |
| | | |
| | | echo "Resetting instance location ..." |
| | | # Launch the unconfigure process. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | |
| | | public class Installation { |
| | | |
| | | /** |
| | | * Relative path to OpenDS jar files. |
| | | * Relative path to OpenDJ jar files. |
| | | */ |
| | | public static final String[] OPEN_DS_JAR_RELATIVE_PATHS = |
| | | {"lib/quicksetup.jar", "lib/OpenDS.jar", "lib/je.jar"}; |
| | | {"lib/quicksetup.jar", "lib/OpenDJ.jar", "lib/je.jar"}; |
| | | |
| | | /** |
| | | * The relative path where all the Windows binaries (batch files) are. |
| | |
| | | /** |
| | | * The path to the default instance. |
| | | */ |
| | | public static final String DEFAULT_INSTANCE_PATH = "/var/opends"; |
| | | public static final String DEFAULT_INSTANCE_PATH = "/var/opendj"; |
| | | |
| | | /** |
| | | * The relative path to the instance.loc file. |
| | |
| | | /** |
| | | * The path to the instance.loc file. |
| | | */ |
| | | public static final String INSTANCE_LOCATION_PATH = "/etc/opends/" + |
| | | public static final String INSTANCE_LOCATION_PATH = "/etc/opendj/" + |
| | | INSTANCE_LOCATION_PATH_RELATIVE; |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer; |
| | |
| | | /** |
| | | * Writes the set-java-home file that is used by the scripts to set the |
| | | * java home and the java arguments. |
| | | * Since the set-java-home file is created and may be changed, |
| | | * it's created under the instancePath. |
| | | * @param installPath the install path of the server. |
| | | * @param javaHome the java home to be used. |
| | | * @param arguments a Map containing as key the name of the script and as |
| | |
| | | writer.close(); |
| | | |
| | | String destinationFile; |
| | | String libDir = Utils.getPath(installPath, |
| | | String libDir = Utils.getPath(Utils |
| | | .getInstancePathFromInstallPath(installPath), |
| | | Installation.LIBRARIES_PATH_RELATIVE); |
| | | if (Utils.isWindows()) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.configurator; |
| | | |
| | |
| | | CheckInstance.class.getName()); |
| | | |
| | | /** Prefix for log files. */ |
| | | static public final String LOG_FILE_PREFIX = "opends-checkinstance-"; |
| | | static public final String LOG_FILE_PREFIX = "opendj-checkinstance-"; |
| | | |
| | | private static String installRootFromSystem; |
| | | private static String instanceRootFromSystem; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.configurator; |
| | | |
| | |
| | | Configurator.class.getName()); |
| | | |
| | | /** Prefix for log files. */ |
| | | static public final String LOG_FILE_PREFIX = "opends-configure-"; |
| | | static public final String LOG_FILE_PREFIX = "opendj-configure-"; |
| | | |
| | | private String installRootFromSystem; |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.configurator; |
| | | |
| | |
| | | Unconfigurator.class.getName()); |
| | | |
| | | /** Prefix for log files. */ |
| | | static public final String LOG_FILE_PREFIX = "opends-unconfigure-"; |
| | | static public final String LOG_FILE_PREFIX = "opendj-unconfigure-"; |
| | | |
| | | private String installRootFromSystem; |
| | | |