blob: e2cd683b810c0656b343caaf10f1944524c60712 [file] [log] [blame]
santanudeafc967b2021-11-01 18:32:18 +05301#!/bin/bash
2# Copyright 2021 Xoriant Corporation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16cd /opt/ves
17touch dmaap.log
18
19config_file="adapter/config/adapter.conf"
20
21sed -i -- "s/kafka_broker =/kafka_broker = $kafka_host:$kafka_port/g" \
22 $config_file
23sed -i -- "s/log_level =/log_level = $log_level/g" \
24 $config_file
25
26
27echo; echo $config_file
28cat $config_file
29
30
31if [ "$log_level" != "" ]; then
32 python3 /opt/ves/adapter/code/dmaap_adapter.py \
33 --config /opt/ves/adapter/config/adapter.conf \
34 --section default > /opt/ves/dmaap.log 2>&1
35else
36 python3 /opt/ves/adapter/code/dmaap_adapter.py \
37 --config /opt/ves/adapter/config/adapter.conf \
38 --section default
39fi