Skip to content

Commit

Permalink
also check da key
Browse files Browse the repository at this point in the history
  • Loading branch information
PCF Developer committed Jan 29, 2019
1 parent a4dc84d commit e4fb39f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions deploy_pcf-opsman.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,25 @@ if (!(test-path -Path "$($HOME)/opsman.pub")) {
Pop-Location
Break
}
if (!(test-path -Path "$($HOME)/$($PCF_SUBDOMAIN_NAME).$($location).$($dnsdomain).crt")) {
write-host "Required$($HOME)/$($PCF_SUBDOMAIN_NAME).$($location).$($dnsdomain).crt not found.
$dnsZoneName = "$PCF_SUBDOMAIN_NAME.$Location.$dnsdomain"

if (!(test-path -Path "$($HOME)/$($dnsZoneName).crt")) {
write-host "Required$($HOME)/$($dnsZoneName).crt not found.
Now Generating Self Signed Certificates
"
$command= "$PSScriptRoot/scripts/create_certs.ps1 -PCF_SUBDOMAIN_NAME $PCF_SUBDOMAIN_NAME -PCF_DOMAIN_NAME $($location).$($dnsdomain)"
Write-Host "Now running $command"
Invoke-Expression -Command $command
}

if (!(test-path -Path "$($HOME)/$($dnsZoneName).key")) {
write-host "Required$($HOME)/$($dnsZoneName).key not found.
Now Generating Self Signed Certificates
"
$command= "$PSScriptRoot/scripts/create_certs.ps1 -PCF_SUBDOMAIN_NAME $PCF_SUBDOMAIN_NAME -PCF_DOMAIN_NAME $($location).$($dnsdomain)"
Write-Host "Now running $command"
Invoke-Expression -Command $command
}
# The SSH Key for OpsManager
$OPSMAN_SSHKEY = Get-Content "$HOME/opsman.pub"
$dnsZoneName = "$PCF_SUBDOMAIN_NAME.$Location.$dnsdomain"
Expand Down

0 comments on commit e4fb39f

Please sign in to comment.