hellohaoyalong edited a comment on issue #59:
URL: 
https://github.com/apache/rocketmq-operator/issues/59#issuecomment-698714480


   BROKER_CONFIG_FILE="$ROCKETMQ_HOME/conf/broker.conf"
   BROKER_CONFIG_MOUNT_FILE="$ROCKETMQ_HOME/conf/broker-common.conf"
   
   function create_config() {
       rm -f $BROKER_CONFIG_FILE
       echo "Creating broker configuration."
       # Remove brokerClusterName, brokerName, brokerId if configured
       ### sed -e '/brokerClusterName/d;/brokerName/d;/brokerId/d' 
$BROKER_CONFIG_MOUNT_FILE > $BROKER_CONFIG_FILE
       sed -e '/brokerClusterName/d;/brokerName/d;/brokerId/d' >> 
$BROKER_CONFIG_FILE
       echo -e >> $BROKER_CONFIG_FILE
       echo "brokerClusterName=$BROKER_CLUSTER_NAME" >> $BROKER_CONFIG_FILE
       echo "brokerName=$BROKER_NAME" >> $BROKER_CONFIG_FILE
       echo "brokerId=$BROKER_ID" >> $BROKER_CONFIG_FILE
       if [ $BROKER_ID != 0 ]; then
           sed -i 's/brokerRole=.*/brokerRole=SLAVE/g' $BROKER_CONFIG_FILE
       fi
   }
   
   create_config
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to