Add backup carp check to cert-expirations.sh
This commit is contained in:
parent
9f3b0a4cd4
commit
ff7737e733
|
@ -1,5 +1,12 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
carp=$(/sbin/ifconfig carp0 2>/dev/null | grep 'status' | cut -d' ' -f2)
|
||||||
|
|
||||||
|
if [ "$carp" = "backup" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "CA certificate:"
|
echo "CA certificate:"
|
||||||
openssl x509 -enddate -noout -in /etc/shellpki/cacert.pem \
|
openssl x509 -enddate -noout -in /etc/shellpki/cacert.pem \
|
||||||
| cut -d '=' -f 2 \
|
| cut -d '=' -f 2 \
|
||||||
|
|
Loading…
Reference in a new issue