Remove disabled queries from output_spec.cfg
[ric-app/mc.git] / mc-core / container_start.sh
1 #!/usr/bin/env bash
2 # vim: ts=4 sw=4 noet:
3 #----------------------------------------------------------------------------------
4 #
5 #       Copyright (c) 2018-2020 AT&T Intellectual Property.
6 #
7 #   Licensed under the Apache License, Version 2.0 (the "License");
8 #   you may not use this file except in compliance with the License.
9 #   You may obtain a copy of the License at
10 #
11 #          http://www.apache.org/licenses/LICENSE-2.0
12 #
13 #   Unless required by applicable law or agreed to in writing, software
14 #   distributed under the License is distributed on an "AS IS" BASIS,
15 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 #   See the License for the specific language governing permissions and
17 #   limitations under the License.
18 #
19 #---------------------------------------------------------------------------------
20
21
22 # ----------------------------------------------------------------------
23 # Mnemonic:     container_start.sh
24 # Abstract: For some "pod" environments a single container is required.
25 #                       This starts all of the related processes which normally would
26 #                       be started in individual containers.
27 #
28 #                       There are two environment variables which affect the operation
29 #                       of this script:
30 #                               USE_NNG -- if set to !0 then the NNG version of the listener
31 #                                                       is started; undefined or when 0 then the SI95
32 #                                                       version is used.
33 #
34 #                               GSLITE_ROOT -- Assumed to be the root directory for the 
35 #                                                       core MC xAPP. If not defined, /mc/gs-lite is
36 #                                                       assumed.
37 #
38 # Date:         13 February 2019
39 # Author:       E. Scott Daniels
40 # ----------------------------------------------------------------------
41
42 set -e
43
44 FIFO_DIR="/tmp/mcl/fifos"
45
46 SIMULATOR_MODE=`python /mc/extract_params.py ${XAPP_DESCRIPTOR_PATH}/config-file.json simulator_mode`
47 RMR_PORT=`python /mc/extract_rmr_port.py ${XAPP_DESCRIPTOR_PATH}/config-file.json rmr-data`
48
49 mkdir -p $FIFO_DIR
50
51 if [ "$SIMULATOR_MODE" != "true" ]
52 then
53 # --- start "sidecars" first. They are expected to need /playpen as the working dir
54
55 (
56         cd /playpen
57         if [ "$RMR_PORT" != "" ]
58         then
59                 bin/mc_listener -p $RMR_PORT
60         else
61                 bin/mc_listener
62         fi
63 ) >/tmp/listener.std 2>&1 &
64
65 echo "listener was started" >&2
66
67 fi
68
69
70 # ---- finally, start the core MC application -----------------------------
71 cd ${GSLITE_ROOT:-/mc/gs-lite}/demo/queries
72 ./runall
73
74