| | |
| | | # An exit code of 0 means options are correct => continue unconfiguration |
| | | # An exit code of 51 means --help or --version option has been specified => do not unconfigure |
| | | # An exit code of 10 means syntax error => do not unconfigure |
| | | "${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_NAME_ARG} -DINSTALL_ROOT=${INSTALL_ROOT} org.opends.server.tools.configurator.Unconfigurator --checkOptions "${@}" |
| | | "${OPENDJ_JAVA_BIN}" ${OPENDJ_JAVA_ARGS} ${SCRIPT_NAME_ARG} -DINSTALL_ROOT=${INSTALL_ROOT} org.opends.server.tools.configurator.Unconfigurator --checkOptions "${@}" |
| | | EC=${?} |
| | | if test ${EC} -eq 10 |
| | | then |
| | |
| | | # Launch the unconfiguration |
| | | # Stop the server if needed |
| | | # Check server status: an exit code of 98 means that the server is running |
| | | ${OPENDS_JAVA_BIN} ${SCRIPT_NAME_ARG} org.opends.server.core.DirectoryServer \ |
| | | ${OPENDJ_JAVA_BIN} ${SCRIPT_NAME_ARG} org.opends.server.core.DirectoryServer \ |
| | | --configClass org.opends.server.extensions.ConfigFileHandler \ |
| | | --configFile "${CONFIG_FILE}" --checkStartability "${@}" > /dev/null 2>&1 |
| | | EC=${?} |
| | |
| | | EC=98 |
| | | while test ${EC} -eq 98 |
| | | do |
| | | ${OPENDS_JAVA_BIN} ${SCRIPT_NAME_ARG} org.opends.server.core.DirectoryServer \ |
| | | ${OPENDJ_JAVA_BIN} ${SCRIPT_NAME_ARG} org.opends.server.core.DirectoryServer \ |
| | | --configClass org.opends.server.extensions.ConfigFileHandler \ |
| | | --configFile "${CONFIG_FILE}" --checkStartability "${@}" > /dev/null 2>&1 |
| | | EC=${?} |
| | | sleep 1 |
| | | sleep 1 |
| | | done |
| | | else |
| | | echo "Unable to stop the server: ${EC}" |
| | |
| | | |
| | | echo "Resetting instance location ..." |
| | | # Launch the unconfigure process. |
| | | "${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_NAME_ARG} -DINSTALL_ROOT=${INSTALL_ROOT} org.opends.server.tools.configurator.Unconfigurator "${@}" |
| | | "${OPENDJ_JAVA_BIN}" ${OPENDJ_JAVA_ARGS} ${SCRIPT_NAME_ARG} -DINSTALL_ROOT=${INSTALL_ROOT} org.opends.server.tools.configurator.Unconfigurator "${@}" |
| | | EC=${?} |
| | | if test ${EC} -eq 10 |
| | | then |