| | |
| | | STARTING_FILE=${INSTANCE_ROOT}/logs/server.starting |
| | | |
| | | |
| | | # See if "-nodetach" was specified as the first command-line argument. If it |
| | | # was, then don't use nohup to send to the background, and send all output to |
| | | # both the console and a log file. |
| | | if test "${1}" = "-nodetach" |
| | | # See if an "-N" or a "--nodetach" argument was provided as a command-line |
| | | # argument. If it was, then don't use nohup to send to the background, and |
| | | # send all output to both the console and a lot file. |
| | | NODETACH=0 |
| | | for ARG in "${@}" |
| | | do |
| | | if test "${ARG}" = "-N" |
| | | then |
| | | NODETACH=1 |
| | | else |
| | | ARG=`echo ${ARG} | tr '[A-Z]' '[a-z]'` |
| | | if test "${ARG}" = "--nodetach" |
| | | then |
| | | NODETACH=1 |
| | | fi |
| | | fi |
| | | done |
| | | |
| | | if test ${NODETACH} -eq 1 |
| | | then |
| | | shift |
| | | echo $$ > "${PID_FILE}" |
| | | rm -f "${PID_FILE}" "${LOG_FILE}" |
| | | exec "${JAVA_BIN}" ${JAVA_ARGS} \ |
| | | org.opends.server.core.DirectoryServer \ |
| | | --configClass org.opends.server.extensions.ConfigFileHandler \ |
| | | --configFile "${CONFIG_FILE}" --noDetach "${@}" |
| | | --configFile "${CONFIG_FILE}" "${@}" |
| | | else |
| | | touch "${STARTING_FILE}" |
| | | nohup "${JAVA_BIN}" ${JAVA_ARGS} \ |