start-ds revision 3978
a169901884ca9d134cbfad013f290fa234c37aedvboxsync# CDDL HEADER START
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# The contents of this file are subject to the terms of the
a169901884ca9d134cbfad013f290fa234c37aedvboxsync# Common Development and Distribution License, Version 1.0 only
a169901884ca9d134cbfad013f290fa234c37aedvboxsync# (the "License"). You may not use this file except in compliance
a169901884ca9d134cbfad013f290fa234c37aedvboxsync# with the License.
a169901884ca9d134cbfad013f290fa234c37aedvboxsync# You can obtain a copy of the license at
a169901884ca9d134cbfad013f290fa234c37aedvboxsync# trunk/opends/resource/legal-notices/OpenDS.LICENSE
a169901884ca9d134cbfad013f290fa234c37aedvboxsync# See the License for the specific language governing permissions
a169901884ca9d134cbfad013f290fa234c37aedvboxsync# and limitations under the License.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# When distributing Covered Code, include this CDDL HEADER in each
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# file and include the License file at
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
a169901884ca9d134cbfad013f290fa234c37aedvboxsync# add the following below this CDDL HEADER, with the fields enclosed
f9fc8c7343143818644af6caf51a2b2520b8b7a9vboxsync# by brackets "[]" replaced with your own identifying information:
f9fc8c7343143818644af6caf51a2b2520b8b7a9vboxsync# Portions Copyright [yyyy] [name of copyright owner]
f9fc8c7343143818644af6caf51a2b2520b8b7a9vboxsync# CDDL HEADER END
02487e3b759646add535e475e35311265235a629vboxsync# Copyright 2006-2008 Sun Microsystems, Inc.
f9fc8c7343143818644af6caf51a2b2520b8b7a9vboxsync# Capture the current working directory so that we can change to it later.
02487e3b759646add535e475e35311265235a629vboxsync# Then capture the location of this script and the Directory Server instance
02487e3b759646add535e475e35311265235a629vboxsync# root so that we can use them to create appropriate paths.
5bdb53763096bf16287f1362de1196e2d2acafdcvboxsynccd "${WORKING_DIR}"
5bdb53763096bf16287f1362de1196e2d2acafdcvboxsync# Specify the script name so that it may be provided in command-line usage.
5bdb53763096bf16287f1362de1196e2d2acafdcvboxsync# check for presence of lib/_svc-opends.sh file
5bdb53763096bf16287f1362de1196e2d2acafdcvboxsync# If present, we should be on Solaris/OpenSolaris and use SMF to start
6e793fadebda53870ee54ac9dcdbe30d612f22b5vboxsync# Check --exec. If not present, start OpenDS from SMF
5bdb53763096bf16287f1362de1196e2d2acafdcvboxsyncif test -f "${INSTALL_ROOT}/lib/_svc-opends.sh"
f9fc8c7343143818644af6caf51a2b2520b8b7a9vboxsync elif [ -z "$1" -o "$1" = "-L" -o "$1" = "-Q" -o "$1" = "-N" -o \
f09a9ba0e70c09ac2c9728909fbf45cb7f81195dvboxsync "$1" = "--nodetach" -o "$1" = "-useLastKnownGoodConfig" \
f9fc8c7343143818644af6caf51a2b2520b8b7a9vboxsync# these options are only used when trying to start the server
88af31c3f3aa61861ef84a71d880714ce2765101vboxsync# In this case, start it through the service.
5bdb53763096bf16287f1362de1196e2d2acafdcvboxsync exec /usr/sbin/svcadm enable -t svc:/network/ldap/server:opends
f9fc8c7343143818644af6caf51a2b2520b8b7a9vboxsync# Set environment variables
02487e3b759646add535e475e35311265235a629vboxsync. "${INSTALL_ROOT}/lib/_script-util.sh"
84ff08359ff42a2fe02b790b4750fb63874611dfvboxsync# Specify the locations of important files that may be used when the server
84ff08359ff42a2fe02b790b4750fb63874611dfvboxsync# is starting.
5bdb53763096bf16287f1362de1196e2d2acafdcvboxsync# See if the provided set of arguments were sufficient for us to be able to
5bdb53763096bf16287f1362de1196e2d2acafdcvboxsync# start the server or perform the requested operation. An exit code of 99
5bdb53763096bf16287f1362de1196e2d2acafdcvboxsync# means that it should be possible to start the server. An exit code of 98
5bdb53763096bf16287f1362de1196e2d2acafdcvboxsync# means that the server is already running and we shouldn't try to start it.
02487e3b759646add535e475e35311265235a629vboxsync# An exit code of anything else means that we're not trying to start the server
5bdb53763096bf16287f1362de1196e2d2acafdcvboxsync# and we can just exit with that exit code.
02487e3b759646add535e475e35311265235a629vboxsync${OPENDS_JAVA_BIN} ${SCRIPT_NAME_ARG} org.opends.server.core.DirectoryServer \
5bdb53763096bf16287f1362de1196e2d2acafdcvboxsync --configClass org.opends.server.extensions.ConfigFileHandler \
6e793fadebda53870ee54ac9dcdbe30d612f22b5vboxsync --configFile "${CONFIG_FILE}" --checkStartability "${@}"
EC=${?}
EC=${?}
exit ${EC}