badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Copyright 2020-present Open Networking Foundation |
| 4 | # |
Ajay Lotan Thakur | 03189d2 | 2022-02-10 14:06:03 -0600 | [diff] [blame] | 5 | # SPDX-License-Identifier: Apache-2.0 |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 6 | |
| 7 | set -ex |
| 8 | |
| 9 | {{- if .Values.config.coreDump.enabled }} |
| 10 | cp /bin/pcrf /tmp/coredump/ |
| 11 | {{- end }} |
| 12 | |
| 13 | CONF_DIR="/opt/c3po/pcrf/conf" |
| 14 | LOGS_DIR="/opt/c3po/pcrf/logs" |
| 15 | #TODO - Need to remove logs directory |
| 16 | mkdir -p $CONF_DIR $LOGS_DIR |
| 17 | |
| 18 | cp /etc/pcrf/conf/{acl.conf,pcrf.json,pcrf.conf,oss.json,subscriber_mapping.json} $CONF_DIR |
| 19 | cat $CONF_DIR/{pcrf.json,pcrf.conf} |
| 20 | |
| 21 | cd $CONF_DIR |
| 22 | make_certs.sh {{ tuple "pcrf" "host" . | include "omec-control-plane.diameter_endpoint" }} {{ tuple "pcrf" "realm" . | include "omec-control-plane.diameter_endpoint" }} |
| 23 | |
| 24 | cd .. |
| 25 | pcrf -j $CONF_DIR/pcrf.json |