diff options
author | tangpeng <tang.peng5@zte.com.cn> | 2019-03-30 07:58:02 +0000 |
---|---|---|
committer | tangpeng <tang.peng5@zte.com.cn> | 2019-03-30 07:58:02 +0000 |
commit | 3f438510b3aae2372b33d4d976cd10482a07492a (patch) | |
tree | 9fa778a3985723598148182b69010b74a4c4d199 /engine-d-standalone/src/main | |
parent | 7ca609c6fecdb3e6996f12572aedde702bf375c9 (diff) |
HTTP/S Modifications
Change-Id: Icabaf996d23297d0d5f16601645665a128616105
Issue-ID: HOLMES-203
Signed-off-by: tangpeng <tang.peng5@zte.com.cn>
Diffstat (limited to 'engine-d-standalone/src/main')
-rw-r--r-- | engine-d-standalone/src/main/assembly/bin/run.sh | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/engine-d-standalone/src/main/assembly/bin/run.sh b/engine-d-standalone/src/main/assembly/bin/run.sh index 0da0cf8..d036ceb 100644 --- a/engine-d-standalone/src/main/assembly/bin/run.sh +++ b/engine-d-standalone/src/main/assembly/bin/run.sh @@ -69,13 +69,31 @@ if [ ! -z ${URL_JDBC} ] && [ `expr index $URL_JDBC :` != 0 ]; then fi echo DB_PORT=$DB_PORT -KEY_PATH="$main_path/conf/holmes.keystore" -KEY_PASSWORD="holmes" +if [ -z ${ENABLE_ENCRYPT} ]; then + export ENABLE_ENCRYPT=true +fi +echo ENABLE_ENCRYPT=$ENABLE_ENCRYPT +KEY_PATH="/home/holmes/conf/holmes.keystore" +KEY_PASSWORD="holmes" #HTTPS Configurations sed -i "s|keyStorePath:.*|keyStorePath: $KEY_PATH|" "$main_path/conf/engine-d.yml" sed -i "s|keyStorePassword:.*|keyStorePassword: $KEY_PASSWORD|" "$main_path/conf/engine-d.yml" +if [ ${ENABLE_ENCRYPT} == true ]; then + sed -i "s|type:\s*https\?$|type: https|" "$main_path/conf/engine-d.yml" + sed -i "s|#\?keyStorePath|keyStorePath|" "$main_path/conf/engine-d.yml" + sed -i "s|#\?keyStorePassword|keyStorePassword|" "$main_path/conf/engine-d.yml" + sed -i "s|#\?validateCerts|validateCerts|" "$main_path/conf/engine-d.yml" + sed -i "s|#\?validatePeers|validatePeers|" "$main_path/conf/engine-d.yml" +else + sed -i 's|type:\s*https\?$|type: http|' "$main_path/conf/engine-d.yml" + sed -i "s|#\?keyStorePath|#keyStorePath|" "$main_path/conf/engine-d.yml" + sed -i "s|#\?keyStorePassword|#keyStorePassword|" "$main_path/conf/engine-d.yml" + sed -i "s|#\?validateCerts|#validateCerts|" "$main_path/conf/engine-d.yml" + sed -i "s|#\?validatePeers|#validatePeers|" "$main_path/conf/engine-d.yml" +fi + cat "$main_path/conf/engine-d.yml" ./bin/initDB.sh $JDBC_USERNAME $JDBC_PASSWORD $DB_NAME $DB_PORT "${URL_JDBC%:*}" |