6331N/A# $Id: start-ds 560 2013-05-22 07:36:34Z elkner $ 486N/A# The contents of this file are subject to the terms of the 486N/A# Common Development and Distribution License, Version 1.0 only 486N/A# (the "License"). You may not use this file except in compliance 486N/A# You can obtain a copy of the license at 486N/A# See the License for the specific language governing permissions 486N/A# and limitations under the License. 486N/A# When distributing Covered Code, include this CDDL HEADER in each 486N/A# file and include the License file at 486N/A# add the following below this CDDL HEADER, with the fields enclosed 873N/A# by brackets "[]" replaced with your own identifying information: 486N/A# Portions Copyright [yyyy] [name of copyright owner] 4362N/A# Copyright 2006-2009 Sun Microsystems, Inc. 6331N/A# Portions Copyright 2011 ForgeRock AS 6331N/A# Portions Copyright 2013 Jens Elkner 6331N/A# would use -i, but -s is also just version info but is not a common switch 6331N/A # remove no detach arg and assume, it is started by SMF 6331N/A [[ ${
ARG} ==
'-N' || ${
ARG} ==
'--nodetach' ]] &&
continue 6331N/A # issue a warning, if the service is running and one tries to start it 6331N/A # manually as well - let the app do the rest 6331N/A print -
u2 "WARNING: The service '${SMF_FMRI}' is not disabled!" 3860N/A# Specify the locations of important files that may be used when the server 6331N/A# We do not check for startability, since for non-Windows it just returns 6331N/A# based on the passed arguments: 6331N/A# 100 => 'start as non-detached' 6331N/A# 103 => 'start as detached quiet' 6331N/A# 104 => 'start as non-detached quiet' 6331N/A# what we already know by parsing the args above. If an arg or instance problem 6331N/A# exists, exit 999 from checkEnv or checkInstance would prevent getting here. 6331N/A# So doing a --checkStartability would not by us anything ... 6331N/A # wait until server startup has finished: removes ${STARTING_FILE} when done 6331N/A # 1 => 'internal error', '2' => 'timeout' 6331N/A # now check, whether the server is still running 6331N/A # 98 => 'already started', otherwise server doesn't run 6331N/A (( $? == 98 )) &&
exit 0 ||
exit 1