From 5d183da0f9478574b92f4cf27c62c904e6ab1744 Mon Sep 17 00:00:00 2001 From: Wenkai Yin Date: Wed, 9 Nov 2016 14:56:32 +0800 Subject: [PATCH] fixes #1002 --- make/harbor.cfg | 4 ++-- tools/ova/script/config.sh | 19 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/make/harbor.cfg b/make/harbor.cfg index db3984603..b4a19da47 100644 --- a/make/harbor.cfg +++ b/make/harbor.cfg @@ -84,6 +84,6 @@ crt_email = example@example.com #The path of cert and key files for nginx, they are applied only the protocol is set to https -ssl_cert = /path/to/server.crt -ssl_cert_key = /path/to/server.key +ssl_cert = /data/server.crt +ssl_cert_key = /data/server.key ############# diff --git a/tools/ova/script/config.sh b/tools/ova/script/config.sh index 20df3f278..1081b0d31 100755 --- a/tools/ova/script/config.sh +++ b/tools/ova/script/config.sh @@ -48,23 +48,22 @@ else fi #Handle http/https -protocal=http +protocol=http echo "Read attribute using ovfenv: [ ssl_cert ]" ssl_cert=$(ovfenv -k ssl_cert) echo "Read attribute using ovfenv: [ ssl_cert_key ]" ssl_cert_key=$(ovfenv -k ssl_cert_key) if [ -n "$ssl_cert" ] && [ -n "$ssl_cert_key" ] then - echo "ssl_cert and ssl_cert_key are set, using HTTPS protocal" - protocal=https - sed -i -r s%"#?ui_url_protocol = .*"%"ui_url_protocol = $protocal"% $cfg - mkdir -p /path/to - echo $ssl_cert > /path/to/server.crt - format /path/to/server.crt - echo $ssl_cert_key > /path/to/server.key - format /path/to/server.key + echo "ssl_cert and ssl_cert_key are set, using HTTPS protocol" + protocol=https + sed -i -r s%"#?ui_url_protocol = .*"%"ui_url_protocol = $protocol"% $cfg + echo $ssl_cert > /data/server.crt + format /data/server.crt + echo $ssl_cert_key > /data/server.key + format /data/server.key else - echo "ssl_cert and ssl_cert_key are not set, using HTTP protocal" + echo "ssl_cert and ssl_cert_key are not set, using HTTP protocol" fi for attr in "${attrs[@]}"