diff --git a/services/console-proxy/server/scripts/config_ssl.sh b/services/console-proxy/server/scripts/config_ssl.sh index 8d80c4731ad..e4747872693 100755 --- a/services/console-proxy/server/scripts/config_ssl.sh +++ b/services/console-proxy/server/scripts/config_ssl.sh @@ -90,6 +90,9 @@ customPrivCert=$(dirname $0)/certs/realhostip.crt customCertChain= publicIp= hostName= +keyStore=$(dirname $0)/certs/realhostip.keystore +aliasName="CPVMCertificate" +storepass="vmops.com" while getopts 'i:h:k:p:t:c' OPTION do case $OPTION in @@ -162,6 +165,12 @@ then exit 2 fi +if [ -f "$customPrivCert" ] +then + keytool -delete -alias $aliasName -keystore $keyStore -storepass $storepass -noprompt + keytool -import -alias $aliasName -keystore $keyStore -storepass $storepass -noprompt -file $customPrivCert +fi + if [ -d /etc/apache2 ] then config_apache2_conf $publicIp $hostName diff --git a/services/secondary-storage/scripts/config_ssl.sh b/services/secondary-storage/scripts/config_ssl.sh index 8d80c4731ad..e4747872693 100755 --- a/services/secondary-storage/scripts/config_ssl.sh +++ b/services/secondary-storage/scripts/config_ssl.sh @@ -90,6 +90,9 @@ customPrivCert=$(dirname $0)/certs/realhostip.crt customCertChain= publicIp= hostName= +keyStore=$(dirname $0)/certs/realhostip.keystore +aliasName="CPVMCertificate" +storepass="vmops.com" while getopts 'i:h:k:p:t:c' OPTION do case $OPTION in @@ -162,6 +165,12 @@ then exit 2 fi +if [ -f "$customPrivCert" ] +then + keytool -delete -alias $aliasName -keystore $keyStore -storepass $storepass -noprompt + keytool -import -alias $aliasName -keystore $keyStore -storepass $storepass -noprompt -file $customPrivCert +fi + if [ -d /etc/apache2 ] then config_apache2_conf $publicIp $hostName