santanude | afc967b | 2021-11-01 18:32:18 +0530 | [diff] [blame^] | 1 | #!/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 | |
| 16 | cd /opt/ves |
| 17 | touch dmaap.log |
| 18 | |
| 19 | config_file="adapter/config/adapter.conf" |
| 20 | |
| 21 | sed -i -- "s/kafka_broker =/kafka_broker = $kafka_host:$kafka_port/g" \ |
| 22 | $config_file |
| 23 | sed -i -- "s/log_level =/log_level = $log_level/g" \ |
| 24 | $config_file |
| 25 | |
| 26 | |
| 27 | echo; echo $config_file |
| 28 | cat $config_file |
| 29 | |
| 30 | |
| 31 | if [ "$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 |
| 35 | else |
| 36 | python3 /opt/ves/adapter/code/dmaap_adapter.py \ |
| 37 | --config /opt/ves/adapter/config/adapter.conf \ |
| 38 | --section default |
| 39 | fi |