aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorU-AD\carlsoan <carlsoan@gophersjos7275.ad.uc.edu>2018-06-21 10:22:55 -0400
committerU-AD\carlsoan <carlsoan@gophersjos7275.ad.uc.edu>2018-06-21 10:22:55 -0400
commit4b3fbafe799eb777110653dcbbd99a7deb49a5bc (patch)
tree37f2ede8c73624b45152ee3bb1ee74923cf59aff
parenta279345cdac3c01d7c4436c53648f858589019cc (diff)
fixed certexpirecheck.shHEADmaster
-rwxr-xr-xcertexpirecheck.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/certexpirecheck.sh b/certexpirecheck.sh
index 003e972..3f4f1ce 100755
--- a/certexpirecheck.sh
+++ b/certexpirecheck.sh
@@ -1,7 +1,7 @@
#!/bin/bash
domainexpiredate() {
- openssl x509 -text -in <(echo -n | openssl s_client -connect $1:$2 2>/dev/null | sed -n '/-*BEGIN/,/-*END/p') 2>/dev/null | sed -n 's/ *Not After : *//p'
+ openssl x509 -text -in <(echo -n | openssl s_client -connect $1:$2 2>/dev/null | awk 'BEGIN { showcrt = 0 } /-*BEGIN CERTIFICATE-*/ { showcrt = 1 } /-*END CERTIFICATE-*/ { print ; showcrt = 0 } { if (showcrt == 1) { print } }') 2>/dev/null | sed -n 's/ *Not After : *//p'
}
daysleft() {