badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Copyright 2019-present Open Networking Foundation |
| 4 | # |
| 5 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 6 | |
| 7 | APPLICATION=$1 |
| 8 | |
| 9 | {{- if .Values.config.coreDump.enabled }} |
| 10 | cp /openmme/target/bin/$APPLICATION /tmp/coredump/ |
| 11 | {{- end }} |
| 12 | |
| 13 | # copy config files to openmme target directly |
| 14 | cp /opt/mme/config/shared/* /openmme/target/conf/ |
| 15 | |
| 16 | cd /openmme/target |
| 17 | export LD_LIBRARY_PATH=/usr/local/lib:./lib |
| 18 | |
| 19 | case $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 |
badhri85 | 135b00c | 2021-12-14 17:46:24 -0700 | [diff] [blame] | 30 | {{- 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 }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 33 | ./bin/s1ap-app |
badhri85 | 135b00c | 2021-12-14 17:46:24 -0700 | [diff] [blame] | 34 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 35 | ;; |
| 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 | ;; |
| 53 | esac |