blob: 1712a77b2a6de5d8be96432dacf8583b2004be59 [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001#!/bin/bash
2
3# Copyright 2019-present Open Networking Foundation
4#
5# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
6
7APPLICATION=$1
8
9{{- if .Values.config.coreDump.enabled }}
10cp /openmme/target/bin/$APPLICATION /tmp/coredump/
11{{- end }}
12
13# copy config files to openmme target directly
14cp /opt/mme/config/shared/* /openmme/target/conf/
15
16cd /openmme/target
17export LD_LIBRARY_PATH=/usr/local/lib:./lib
18
19case $APPLICATION in
20 "mme-app")
21 echo "Starting mme-app"
22 echo "conf/mme.json"
23 cat conf/mme.json
24 ./bin/mme-app
25 ;;
26 "s1ap-app")
27 echo "Starting s1ap-app"
28 echo "conf/s1ap.json"
29 cat conf/s1ap.json
badhri85135b00c2021-12-14 17:46:24 -070030 {{- if .Values.config.valgrind.enabled }}
31 valgrind --log-file=/bin/valgrind_output_s1ap.txt --tool=memcheck -v --leak-check=full --show-leak-kinds=all ./bin/s1ap-app
32 {{- else }}
badhri854c028b32021-11-03 18:24:05 -050033 ./bin/s1ap-app
badhri85135b00c2021-12-14 17:46:24 -070034 {{- end }}
badhri854c028b32021-11-03 18:24:05 -050035 ;;
36 "s6a-app")
37 echo "Starting s6a-app"
38 echo "conf/s6a.json"
39 cat conf/s6a.json
40 echo "conf/s6a_fd.conf"
41 cat conf/s6a_fd.conf
42 ./bin/s6a-app
43 ;;
44 "s11-app")
45 echo "Starting s11-app"
46 echo "conf/s11.json"
47 cat conf/s11.json
48 ./bin/s11-app
49 ;;
50 *)
51 echo "invalid app $APPLICATION"
52 ;;
53esac