This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
fqdn=ilo.example.com | |
username=Administrator | |
password=Password | |
#Check if the certificate is expiring soon | |
echo | openssl s_client -servername $fqdn -connect $fqdn:443 2>/dev/null | openssl x509 -noout -checkend 2592000 | |
if [ "$?" == "1" ]; then | |
#Expiring in less than one month. We need to renew |