#!/bin/sh
# Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.

# Exit codes
OK=0
FAIL=1

## Run setup scripts.

# Nothing to do on upgrade.
if $UPGRADE
then
    exit $OK
fi

# Key to encrypt keystores
$INSTDIR/bin/tarantella security keygen >/dev/null 2>&1

# Setup the keystores - our peer certificates and self generated external certs
$INSTDIR/bin/tarantella security keystoregen >/dev/null 2>&1

# Setup security configuration
$INSTDIR/bin/tarantella security stop --install >/dev/null

exit $OK
