]> Sergey Matveev's repositories - sgmon.git/blob - helper/https-cert
2f3a0b82d1114982b3d727142ded5e056c30583d
[sgmon.git] / helper / https-cert
1 #!/bin/sh -e
2
3 bad=0
4 curl --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