From 857c9da5ed2a2775ac7426d97a99195d671c21b5 Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Fri, 12 Aug 2022 09:07:04 +0800 Subject: Supported either HTTP or HTTPS Issue-ID: HOLMES-511 Signed-off-by: Guangrong Fu Change-Id: Ibeb5d19aa5cb69a71b13157f0fd63ed84478aa34 --- rulemgt-standalone/src/main/assembly/bin/run.sh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'rulemgt-standalone') diff --git a/rulemgt-standalone/src/main/assembly/bin/run.sh b/rulemgt-standalone/src/main/assembly/bin/run.sh index f54ca50..d1cebc3 100644 --- a/rulemgt-standalone/src/main/assembly/bin/run.sh +++ b/rulemgt-standalone/src/main/assembly/bin/run.sh @@ -92,21 +92,18 @@ echo "KEY_PASS=$KEY_PASSWORD" sed -i "s|key-store:.*|key-store: $KEY_PATH|" "$main_path/conf/application.yaml" sed -i "s|key-store-password:.*|key-store-password: $KEY_PASSWORD|" "$main_path/conf/application.yaml" -if [ ${ENABLE_ENCRYPT} = true ]; then - sed -i "s|type:\s*https\?$|type: https|" "$main_path/conf/rulemgt.yml" - sed -i "s|#\?keyStorePath|keyStorePath|" "$main_path/conf/rulemgt.yml" - sed -i "s|#\?keyStorePassword|keyStorePassword|" "$main_path/conf/rulemgt.yml" - sed -i "s|#\?validateCerts|validateCerts|" "$main_path/conf/rulemgt.yml" - sed -i "s|#\?validatePeers|validatePeers|" "$main_path/conf/rulemgt.yml" +if [ "${ENABLE_ENCRYPT}"x = "true"x ]; then + sed -i "s|#\?ssl:|ssl:|" "$main_path/conf/application.yaml" + sed -i "s|#\?key-store|key-store|" "$main_path/conf/application.yaml" + sed -i "s|#\?key-store-password|key-store-password|" "$main_path/conf/application.yaml" + sed -i "s|#\?key-store-type|key-store-type|" "$main_path/conf/application.yaml" else - sed -i 's|type:\s*https\?$|type: http|' "$main_path/conf/rulemgt.yml" - sed -i "s|#\?keyStorePath|#keyStorePath|" "$main_path/conf/rulemgt.yml" - sed -i "s|#\?keyStorePassword|#keyStorePassword|" "$main_path/conf/rulemgt.yml" - sed -i "s|#\?validateCerts|#validateCerts|" "$main_path/conf/rulemgt.yml" - sed -i "s|#\?validatePeers|#validatePeers|" "$main_path/conf/rulemgt.yml" + sed -i 's|#\?ssl:|#ssl:|' "$main_path/conf/application.yaml" + sed -i "s|#\?key-store|#key-store|" "$main_path/conf/application.yaml" + sed -i "s|#\?key-store-password|#key-store-password|" "$main_path/conf/application.yaml" + sed -i "s|#\?key-store-type|#key-store-type|" "$main_path/conf/application.yaml" fi - ${RUNHOME}/initDB.sh "$JDBC_USERNAME" "$JDBC_PASSWORD" "$DB_NAME" "$DB_PORT" "${URL_JDBC%:*}" -- cgit 1.2.3-korg