]> Sergey Matveev's repositories - sgmon.git/blob - helper/https-cert
573b6179d5cfaeccf2066f651e53fa016748e6ac
[sgmon.git] / helper / https-cert
1 #!/bin/sh -e
2
3 bad=0
4 curl --range 0-100 --max-time 60 --verbose "$1" >/dev/null 2>state/curl-out || bad=1
5 grep -q "subject:.*CN=$2" state/curl-out || bad=1
6 if [ "$bad" -eq 1 ] ; then
7     cat state/curl-out
8     exit 1
9 fi