blob: 5a6363368c117d3138d536124a18fa195d4eaa17 [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001#!/bin/bash
2
3# Copyright 2019-present Open Networking Foundation
4#
Ajay Lotan Thakur03189d22022-02-10 14:06:03 -06005# SPDX-License-Identifier: Apache-2.0
badhri854c028b32021-11-03 18:24:05 -05006
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"
badhri8535ee61f2022-01-03 14:32:37 -060029 today=`date '+%Y_%m_%d__%H_%M_%S'`;
30 filename="/tmp/valgrind_output_s1ap_$today.txt"
31 echo $filename
badhri854c028b32021-11-03 18:24:05 -050032 cat conf/s1ap.json
badhri85135b00c2021-12-14 17:46:24 -070033 {{- if .Values.config.valgrind.enabled }}
badhri8535ee61f2022-01-03 14:32:37 -060034 valgrind --log-file=$filename --tool=memcheck -v --leak-check=full --show-leak-kinds=all ./bin/s1ap-app
badhri85135b00c2021-12-14 17:46:24 -070035 {{- else }}
badhri854c028b32021-11-03 18:24:05 -050036 ./bin/s1ap-app
badhri85135b00c2021-12-14 17:46:24 -070037 {{- end }}
badhri854c028b32021-11-03 18:24:05 -050038 ;;
39 "s6a-app")
40 echo "Starting s6a-app"
41 echo "conf/s6a.json"
42 cat conf/s6a.json
43 echo "conf/s6a_fd.conf"
44 cat conf/s6a_fd.conf
45 ./bin/s6a-app
46 ;;
47 "s11-app")
48 echo "Starting s11-app"
49 echo "conf/s11.json"
50 cat conf/s11.json
51 ./bin/s11-app
52 ;;
53 *)
54 echo "invalid app $APPLICATION"
55 ;;
56esac