blob: 9a185e6383842bf86f6a5b0fe7c5052ce54d476c [file] [log] [blame]
#!/bin/bash
# Copyright 2019-present Open Networking Foundation
#
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
set -xe
{{- if .Values.config.coreDump.enabled }}
cp /bin/ngic_controlplane /tmp/coredump/
{{- end }}
mkdir -p /opt/cp/config
cd /opt/cp/config
cp /etc/cp/config/{adc_rules.cfg,cp_config.cfg,interface.cfg,meter_profile.cfg,pcc_rules.cfg,sdf_rules.cfg,app_config.cfg} .
sed -i "s/CP_ADDR/$POD_IP/g" interface.cfg
{{- if .Values.config.spgwc.pfcp }}
cp /etc/cp/config/{cp.cfg,subscriber_mapping.json} .
sed -i "s/CP_ADDR/$POD_IP/g" cp.cfg
cat /opt/cp/config/subscriber_mapping.json
{{- end }}
. cp_config.cfg
ngic_controlplane $EAL_ARGS -- $APP_ARGS