#!/usr/local/bin/bash Version=1.0.2 # Usage: dfm_broker.sh INSTANCE on|off # # If on: # Disable the and any other brokers for this instance. # Enable the dfm (Down For Maintenance) broker for the instance. # # If off: # Disable the dfm (Down For Maintenance) broker for the instance. # Enable the default broker for the instance. # Do nothing unless $SDP_INSTANCE is defined. export SDP_INSTANCE=${1:-Unset} declare Mode=${2:-Unset} declare BrokerInitScript=/p4/$SDP_INSTANCE/bin/p4broker_${SDP_INSTANCE}_init if [[ $SDP_INSTANCE == Unset ]]; then echo -e "\nError: The SDP_INSTANCE is not defined.\n." exit 1 fi if [[ ${Mode^^} != ON && ${Mode^^} != OFF ]]; then echo -e "\nError: Bad usage. Usage:\n\t${0##*/} INSTANCE on|off\n" exit 1 fi if [[ ! -x $BrokerInitScript ]]; then echo -e "\nError: $BrokerInitScript is not executable." exit 1; fi # Note: We stop all configured brokers, but when DFM is done, we only # restart the default broker. Any others need to be restarted manually. if [[ ${Mode^^} == ON ]]; then $BrokerInitScript stop all $BrokerInitScript start dfm else $BrokerInitScript stop dfm $BrokerInitScript start fi
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 20807 | C. Thomas Tyler |
Released SDP 2016.2.20805 (2016/10/02). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#1 | 20767 | C. Thomas Tyler |
Released SDP 2016.2.20755 (2016/09/29). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
//guest/perforce_software/sdp/dev/Server/Unix/p4/common/hms/scripts/dfm_broker.sh | |||||
#1 | 20745 | C. Thomas Tyler |
Approving as is since it isn't changing core SDP functionality, and reviewing it all line by line will take some time. We can do that as we move forward with it. First addition of HMS v1.0 files. This change is a soft launch HMS for initial deployment and testing. Updates to HMS-related files are expected and will bypass pre-commit code review until stabilized. |