blob: 7be50a6a82d5faabfe8d38cf58f58c598a3229f7 [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001#!/bin/bash
2
3# Copyright 2020-present Open Networking Foundation
4#
5# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
6
7set -ex
8
9{{- if .Values.config.coreDump.enabled }}
10cp /bin/pcrf /tmp/coredump/
11{{- end }}
12
13CONF_DIR="/opt/c3po/pcrf/conf"
14LOGS_DIR="/opt/c3po/pcrf/logs"
15#TODO - Need to remove logs directory
16mkdir -p $CONF_DIR $LOGS_DIR
17
18cp /etc/pcrf/conf/{acl.conf,pcrf.json,pcrf.conf,oss.json,subscriber_mapping.json} $CONF_DIR
19cat $CONF_DIR/{pcrf.json,pcrf.conf}
20
21cd $CONF_DIR
22make_certs.sh {{ tuple "pcrf" "host" . | include "omec-control-plane.diameter_endpoint" }} {{ tuple "pcrf" "realm" . | include "omec-control-plane.diameter_endpoint" }}
23
24cd ..
25pcrf -j $CONF_DIR/pcrf.json