diff options
author | GuangrongFu <fu.guangrong@zte.com.cn> | 2021-03-10 14:14:06 +0800 |
---|---|---|
committer | GuangrongFu <fu.guangrong@zte.com.cn> | 2021-03-10 14:14:06 +0800 |
commit | e15ff607c1a6d679b5123ce55188f173921dd91e (patch) | |
tree | 6bec590c9271035c840168546a58ae0fdabae85d /rulemgt-standalone/src/main/assembly | |
parent | 4fe5262e828c2f3a4f8a5be0e1308a683d3b058e (diff) |
Fixed some errors in shell scripts
Change-Id: Iacaac4cc4c89a5340480954ea477867d3e55b5eb
Issue-ID: HOLMES-396
Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'rulemgt-standalone/src/main/assembly')
-rw-r--r-- | rulemgt-standalone/src/main/assembly/bin/initDB.sh | 2 | ||||
-rw-r--r-- | rulemgt-standalone/src/main/assembly/bin/run.sh | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/rulemgt-standalone/src/main/assembly/bin/initDB.sh b/rulemgt-standalone/src/main/assembly/bin/initDB.sh index 436d48d..89f9264 100644 --- a/rulemgt-standalone/src/main/assembly/bin/initDB.sh +++ b/rulemgt-standalone/src/main/assembly/bin/initDB.sh @@ -49,7 +49,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 aplus_rule;' sql_result=$? -if [ $need_unset -eq 1 ]; then +if [ $need_unset = 1 ]; then unset PGPASSWORD fi diff --git a/rulemgt-standalone/src/main/assembly/bin/run.sh b/rulemgt-standalone/src/main/assembly/bin/run.sh index 5b645b1..49ffc53 100644 --- a/rulemgt-standalone/src/main/assembly/bin/run.sh +++ b/rulemgt-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}:9101 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 |