blob: 72050cd30ce0b212fb85f9e61fa949da41d617b0 [file] [log] [blame]
#!/bin/bash
# Copyright 2020-present Open Networking Foundation
#
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
set -ex
{{- if .Values.config.coreDump.enabled }}
cp /bin/pcrf /tmp/coredump/
{{- end }}
CONF_DIR="/opt/c3po/pcrf/conf"
LOGS_DIR="/opt/c3po/pcrf/logs"
#TODO - Need to remove logs directory
mkdir -p $CONF_DIR $LOGS_DIR
cp /etc/pcrf/conf/{acl.conf,pcrf.json,pcrf.conf,oss.json} $CONF_DIR
cat $CONF_DIR/{pcrf.json,pcrf.conf}
cd $CONF_DIR
make_certs.sh {{ tuple "pcrf" "host" . | include "omec-control-plane.diameter_endpoint" }} {{ tuple "pcrf" "realm" . | include "omec-control-plane.diameter_endpoint" }}
cd ..
pcrf -j $CONF_DIR/pcrf.json