Don't let error message slip through when no certs have been downloaded
This commit is contained in:
parent
868c813055
commit
274ee394e8
|
@ -1192,7 +1192,7 @@ server_defaults() {
|
||||||
savedir=`pwd`; cd $TEMPDIR
|
savedir=`pwd`; cd $TEMPDIR
|
||||||
$OPENSSL s_client -showcerts $STARTTLS -connect $NODEIP:$PORT $SNI 2>/dev/null </dev/null | \
|
$OPENSSL s_client -showcerts $STARTTLS -connect $NODEIP:$PORT $SNI 2>/dev/null </dev/null | \
|
||||||
awk -v c=-1 '/-----BEGIN CERTIFICATE-----/{inc=1;c++} inc {print > ("level" c ".crt")} /---END CERTIFICATE-----/{inc=0}'
|
awk -v c=-1 '/-----BEGIN CERTIFICATE-----/{inc=1;c++} inc {print > ("level" c ".crt")} /---END CERTIFICATE-----/{inc=0}'
|
||||||
nrsaved=`ls $TEMPDIR/level?.crt | wc -w`
|
nrsaved=`ls $TEMPDIR/level?.crt 2>/dev/null | wc -w`
|
||||||
outln " # of certificates provided $nrsaved"
|
outln " # of certificates provided $nrsaved"
|
||||||
cd $savedir
|
cd $savedir
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue