Add backup carp check to cert-expirations.sh

This commit is contained in:
Jérémy Dubois 2020-11-06 10:14:03 +01:00
parent 9f3b0a4cd4
commit ff7737e733
1 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,12 @@
#!/bin/sh
carp=$(/sbin/ifconfig carp0 2>/dev/null | grep 'status' | cut -d' ' -f2)
if [ "$carp" = "backup" ]; then
exit 0
fi
echo "CA certificate:"
openssl x509 -enddate -noout -in /etc/shellpki/cacert.pem \
| cut -d '=' -f 2 \