You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by go...@apache.org on 2022/04/20 10:27:39 UTC

[incubator-inlong] branch master updated: [INLONG-3853][Audit] fix the docker images script bug (#3854)

This is an automated email from the ASF dual-hosted git repository.

gosonzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 46c19c123 [INLONG-3853][Audit] fix the docker images script bug (#3854)
46c19c123 is described below

commit 46c19c123a2ad87313505cd6abe926fa6c7ca0b3
Author: dockerzhang <do...@apache.org>
AuthorDate: Wed Apr 20 18:27:33 2022 +0800

    [INLONG-3853][Audit] fix the docker images script bug (#3854)
---
 inlong-audit/audit-docker/audit-docker.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/inlong-audit/audit-docker/audit-docker.sh b/inlong-audit/audit-docker/audit-docker.sh
old mode 100644
new mode 100755
index 6d264e13f..abf412119
--- a/inlong-audit/audit-docker/audit-docker.sh
+++ b/inlong-audit/audit-docker/audit-docker.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -28,12 +28,12 @@ sed -i "s/spring.datasource.druid.username=.*$/spring.datasource.druid.username=
 sed -i "s/spring.datasource.druid.password=.*$/spring.datasource.druid.password=${PASSWORD}/g" "${store_conf_file}"
 
 # replace the configuration for audit proxy
-if [ "${MQ_TYPE}" == "pulsar" ]; then
+if [[ "${MQ_TYPE}" == "pulsar" ]]; then
   sed -i "s/audit.pulsar.server.url=.*$/audit.pulsar.server.url=pulsar:\/\/${PULSAR_BROKER_LIST}/g" "${store_conf_file}"
   sed -i "s/agent1.sinks.pulsar-sink-msg1.pulsar_server_url = .*$/agent1.sinks.pulsar-sink-msg1.pulsar_server_url = pulsar:\/\/${PULSAR_BROKER_LIST}/g" "${proxy_conf_file}"
   sed -i "s/agent1.sinks.pulsar-sink-msg2.pulsar_server_url = .*$/agent1.sinks.pulsar-sink-msg2.pulsar_server_url = pulsar:\/\/${PULSAR_BROKER_LIST}/g" "${proxy_conf_file}"
 fi
-if [ "${MQ_TYPE}" == "tube" ]; then
+if [[ "${MQ_TYPE}" == "tube" ]]; then
   sed -i "s/audit.tube.masterlist=.*$/audit.tube.masterlist=${TUBE_MASTER_LIST}/g" "${store_conf_file}"
   sed -i "s/agent1.sinks.tube-sink-msg1.master-host-port-list = .*$/agent1.sinks.tube-sink-msg1.master-host-port-list = ${TUBE_MASTER_LIST}/g" "${proxy_conf_file}"
   sed -i "s/agent1.sinks.tube-sink-msg2.master-host-port-list = .*$/agent1.sinks.tube-sink-msg2.master-host-port-list = ${TUBE_MASTER_LIST}/g" "${proxy_conf_file}"
@@ -47,7 +47,7 @@ if [[ "${JDBC_URL}" =~ (.+):([0-9]+) ]]; then
   select_db_sql="SELECT COUNT(*) FROM information_schema.TABLES WHERE table_schema = 'apache_inlong_audit'"
   inlong_audit_count=$(mysql -h${datasource_hostname} -P${datasource_port} -u${USERNAME} -p${PASSWORD} -e "${select_db_sql}")
   inlong_num=$(echo "$inlong_audit_count" | tr -cd "[0-9]")
-  if [ $inlong_num -eq 0 ]; then
+  if [[ $inlong_num == 0 ]]; then
     mysql -h${datasource_hostname} -P${datasource_port} -u${USERNAME} -p${PASSWORD} < sql/apache_inlong_audit.sql
   fi
 fi