Skip to content
Snippets Groups Projects
Unverified Commit f2a2443b authored by Max Adamo's avatar Max Adamo
Browse files

exit if error happens

parent 423a5845
No related branches found
No related tags found
No related merge requests found
......@@ -333,14 +333,8 @@ Options:
WriteToFile(fullChain, tmpFullchainDestination, GroupName, 0644, 0755)
WriteToFile(ca, tmpCaDestination, GroupName, 0644, 0755)
WriteToFile(privKey, tmpKeyDestination, GroupName, 0640, 0750)
newCert := checkCerificates(CertName, tmpCertificateDestination, tmpFullchainDestination, tmpCaDestination, tmpKeyDestination, Days, false)
if newCert == false {
fmt.Printf("the certificates are malformed. Skippping installation\n")
for _, element := range tempCertSlice {
os.Remove(element)
}
appExit(255)
}
checkCerificates(CertName, tmpCertificateDestination, tmpFullchainDestination, tmpCaDestination, tmpKeyDestination, Days, true)
WriteToFile(certificate, certificateDestination, GroupName, 0644, 0755)
WriteToFile(fullChain, fullchainDestination, GroupName, 0644, 0755)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment