#!/usr/bin/env bash
#==============================================================================
# Copyright and license info is available in the LICENSE file included with
# the Server Deployment Package (SDP), and also available online:
# https://swarm.workshop.perforce.com/projects/perforce-software-sdp/view/main/LICENSE
#------------------------------------------------------------------------------

set -e
instance=${1}
shift
source /p4/common/bin/p4_vars $instance
if [[ "${P4REPLICA}" == "TRUE" ]] && [[ $EDGESERVER -eq 0 ]]; then
   exec $@
fi
