blob: 11d6f7f9b1c5c17554b700f039b66dc0c47cf436 [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
santanude31cb2682021-12-21 20:19:01 +053016cd /opt/smo
santanudeafc967b2021-11-01 18:32:18 +053017touch 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
santanude31cb2682021-12-21 20:19:01 +053032 python3 /opt/smo/adapter/code/dmaap_adapter.py \
33 --config /opt/smo/adapter/config/adapter.conf \
34 --section default > /opt/smo/dmaap.log 2>&1
santanudeafc967b2021-11-01 18:32:18 +053035else
santanude31cb2682021-12-21 20:19:01 +053036 python3 /opt/smo/adapter/code/dmaap_adapter.py \
37 --config /opt/smo/adapter/config/adapter.conf \
santanudeafc967b2021-11-01 18:32:18 +053038 --section default
39fi