summaryrefslogtreecommitdiffstats
path: root/engine-d-standalone/src
diff options
context:
space:
mode:
authorGuangrongFu <fu.guangrong@zte.com.cn>2021-03-10 14:14:57 +0800
committerGuangrongFu <fu.guangrong@zte.com.cn>2021-03-10 14:14:57 +0800
commit70448b0527cd381904492209f7ff73ad7069d142 (patch)
treeda1076216bd563363cab9d7589941b6cb3e4bf89 /engine-d-standalone/src
parentc04c868f843c7f5b3ba7d81dbddc9fb0504fb5b8 (diff)
Fixed some errors in shell scripts
Change-Id: I7dd754eec3207c2b3ed8fdddbf286d69378e230b Issue-ID: HOLMES-396 Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'engine-d-standalone/src')
-rw-r--r--engine-d-standalone/src/main/assembly/bin/initDB.sh2
-rw-r--r--engine-d-standalone/src/main/assembly/bin/run.sh4
2 files changed, 3 insertions, 3 deletions
diff --git a/engine-d-standalone/src/main/assembly/bin/initDB.sh b/engine-d-standalone/src/main/assembly/bin/initDB.sh
index 3d2e8bc..cc27b09 100644
--- a/engine-d-standalone/src/main/assembly/bin/initDB.sh
+++ b/engine-d-standalone/src/main/assembly/bin/initDB.sh
@@ -51,7 +51,7 @@ psql -U "$user" -p "$port" -h "$host" -d "$dbname" -f $main_path/dbscripts/postg
psql -U "$user" -p "$port" -h "$host" -d "$dbname" --command 'select * from alarm_info;'
sql_result=$?
-if [ $need_unset -eq 1 ]; then
+if [ $need_unset = 1 ]; then
unset PGPASSWORD
fi
diff --git a/engine-d-standalone/src/main/assembly/bin/run.sh b/engine-d-standalone/src/main/assembly/bin/run.sh
index 4a528d8..b0cfe18 100644
--- a/engine-d-standalone/src/main/assembly/bin/run.sh
+++ b/engine-d-standalone/src/main/assembly/bin/run.sh
@@ -60,7 +60,7 @@ fi
export SERVICE_IP=`hostname -i`
echo SERVICE_IP=${SERVICE_IP}
-if [ ! -z ${TESTING} -a ${TESTING} = 1 ]; then
+if [ ! -z ${TESTING} ] && [ ${TESTING} = 1 ]; then
if [ ! -z ${HOST_IP} ]; then
export HOSTNAME=${HOST_IP}:9102
else
@@ -69,7 +69,7 @@ if [ ! -z ${TESTING} -a ${TESTING} = 1 ]; then
fi
export DB_PORT=5432
-if [ ! -z ${URL_JDBC} -a `expr index $URL_JDBC :` != 0 ]; then
+if [ ! -z ${URL_JDBC} ] && [ `expr index $URL_JDBC :` != 0 ]; then
export DB_PORT="${URL_JDBC##*:}"
fi
echo DB_PORT=$DB_PORT