Skip to content

Commit 5dc1447

Browse files
committed
fix sslexpiry func
1 parent 79ca840 commit 5dc1447

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.functions/sslcert

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
sslexpiry() {
2-
echo | openssl s_client -connect "${1}" 2> /dev/null | \
3-
openssl x509 -noout -enddate | \
4-
cut -d = -f 2
2+
if [[ "x" == "${1}x" ]]; then
3+
echo "Usage: ${0} <domain:port>"
4+
else
5+
echo | openssl s_client -connect "${1}" 2> /dev/null | \
6+
openssl x509 -noout -enddate | \
7+
cut -d = -f 2
8+
fi
59
}

0 commit comments

Comments
 (0)