#!/bin/sh
#
# --- BEGIN COPYRIGHT BLOCK ---
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Copyright (C) 2007 Red Hat, Inc.
# All rights reserved.
# --- END COPYRIGHT BLOCK ---
#

# load default, system-wide, and user-specific PKI configuration and
# set NSS_DEFAULT_DB_TYPE.
. /usr/share/pki/scripts/config

CP=${PKI_LIB}/*
CP=/usr/share/java/pki/pki-console-theme.jar:${CP}
CP=/usr/share/java/pki/pki-console.jar:${CP}
export CP

${JAVA_HOME}/bin/java \
  ${JAVA_OPTIONS} \
  -cp ${CP} \
  -Djava.util.prefs.systemRoot=/tmp/.java \
  -Djava.util.prefs.userRoot=/tmp/java \
  -Djava.util.logging.config.file=${PKI_LOGGING_CONFIG} \
  com.netscape.admin.certsrv.Console \
  "$@"

exit $?
