# $Id: setup 554 2013-04-22 09:12:58Z elkner $
#
# License: CDDL 1.0 (see http://opensource.org/licenses/cddl-1.0)
# Copyright 2013 Jens Elkner
# Set env vars
checkEnv 'set-full-environment-and-test-java'
integer INFO=0
# If running as ldapd it is assumed, that the target is a system instance
then
if [[ -z $X ]]; then
print -u2 'The system does not know anything about the service' \
"'${SMF_FMRI}'"
exit 1
fi
if [[ $X != 'disabled' ]]; then
# The script runs as the instance owner (default: ldapd), which should
# not have solaris.smf.manage.opendj authorization. So trying to
# disable it would yield an error anyway.
#print -u2 "Trying to disable service '${SMF_FMRI}' ..."
#print -u2 "Done."
Use the following command to disable it before starting setup again:
\t' "svcadm disable ${SMF_FMRI}"
exit 1
fi
fi
RM_FILES="keystore.pin truststore keystore"
EXISTING_FILES=' '
done
# Launch the setup
# MaintainConfigArchive is needed, otherwise if the cli gets invoked, it writes
# an archived config unconditionally _on startup_, which would prevent runnning
-Dorg.opends.server.InstallRoot="${INSTALL_ROOT}" \
-Dorg.opends.server.InstanceRoot="${INSTANCE_ROOT}" \
RC=$?
# remove the files, which would people driving nuts, because a 2nd run
# of setup would re-use them ...
FILE="${INSTANCE_ROOT}/config/$F"
[[ ! -f ${FILE} ]] && continue
done
exit ${RC}
fi
exit 0