p4broker_instance_init.template #1

  • //
  • guest/
  • trina/
  • sdp/
  • main/
  • Server/
  • Unix/
  • p4/
  • common/
  • etc/
  • init.d/
  • p4broker_instance_init.template
  • View
  • Commits
  • Open Download .zip Download (1 KB)
#!/bin/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
#------------------------------------------------------------------------------
#
# Use "chkconfig --add p4broker_REPL_SDP_INSTANCE_init" to set up the script to start and stop automatically.
# Perforce Init Script.
# chkconfig: - 90 30
# description: Start Perforce broker instance REPL_SDP_INSTANCE

# Usage: p4broker_REPL_SDP_INSTANCE_init start|stop|status|restart [ConfigTag]

source /p4/common/bin/p4_vars REPL_SDP_INSTANCE || exit 1

declare OpMode=${1:-status}
declare ConfigTag=${2:-default}

if [[ $ConfigTag == default ]]; then
   if [[ -r /p4/common/config/${P4SERVER}.broker.${HOSTNAME%%.*}.cfg ]]; then
      export P4BROKERCFG=${P4CCFG}/${P4SERVER}.broker.${HOSTNAME%%.*}.cfg
   else
      export P4BROKERCFG=${P4CCFG}/${P4SERVER}.broker.cfg
   fi
else
   export P4BROKERCFG=${P4CCFG}/${P4SERVER}.broker.${ConfigTag}.cfg
fi

source /p4/common/bin/p4broker_base "$OpMode" "$ConfigTag"
# Change User Description Committed
#1 19278 trina "Forking branch Main of perforce-software-sdp to trina-sdp."
//guest/perforce_software/sdp/main/Server/Unix/p4/common/etc/init.d/p4broker_instance_init.template
#8 18961 C. Thomas Tyler Released: SDP/MultiArch/2016.1/18958 (2016/04/08).
#7 18619 Russell C. Jackson (Rusty) Updating main with current changes.
#6 15856 C. Thomas Tyler Replaced the big license comment block with a shortened
form referencing the LICENSE file included with the SDP
package, and also by the URL for the license file in
The Workshop.
#5 13917 C. Thomas Tyler Pushing SDP 2015.1.13915.
#4 12873 Russell C. Jackson (Rusty) Dropped server.id from the filename.
#3 11924 Russell C. Jackson (Rusty) Change the location and name of the broker config file.
It now lives here:

 /p4/common/config/${P4SERVER}.${SERVERID}.broker.cfg

 I made it both instance and server unique because you may want different
 settings depending on if you are running a master or a replica.
#2 11524 Russell C. Jackson (Rusty) Released updated version of the SDP from Dev.
#1 10148 C. Thomas Tyler Promoted the Perforce Server Deployment Package to The Workshop.