run_if_proxy.sh #1

  • //
  • p4-sdp/
  • dev_rebrand2/
  • Server/
  • Unix/
  • p4/
  • common/
  • bin/
  • run_if_proxy.sh
  • View
  • Commits
  • Open Download .zip Download (825 B)
#!/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
#------------------------------------------------------------------------------

instance=${1:-${SDP_INSTANCE:-UnsetSDPInstance}}
[[ "$instance" == UnsetSDPInstance ]] && \
   { echo "Instance parameter required unless SDP_INSTANCE is defined."; exit 1; }

shift
# shellcheck disable=SC1091
source /p4/common/bin/p4_vars "$instance"
# shellcheck disable=SC1091
source /p4/common/bin/backup_functions.sh
set_vars

# shellcheck disable=SC2154
if [[ -x "$P4ProxyInitScript" ]]; then
   exec "$@"
fi
# Change User Description Committed
#1 31646 C. Thomas Tyler Populate -r -o -S //p4-sdp/dev_rebrand2.
//p4-sdp/dev/Server/Unix/p4/common/bin/run_if_proxy.sh
#1 31397 C. Thomas Tyler Populate -b SDP_Classic_to_Streams -s //guest/perforce_software/sdp/...@31368.
//guest/perforce_software/sdp/dev/Server/Unix/p4/common/bin/run_if_proxy.sh
#3 31311 C. Thomas Tyler Updated run_if_*.sh scripts:
* Fixed bug in run_if_broker.sh.
* Normalized command line verification.
* Removed 'set -e' from run_if_*.sh scripts to improve reliability.
* Made ShellCheck compliant.

#review-31312
#2 29099 C. Thomas Tyler Added log rotation for proxy-only host.
#1 28397 C. Thomas Tyler Enhanced support for proxy-only and broker-only hosts.

#review-28398