Skip to content

Instantly share code, notes, and snippets.

@starcraft66
starcraft66 / le-hpilo.sh
Last active February 3, 2025 20:24
Automatically deploy TLS certificates to HP iLO4 management controllers using the dehydrated ACME client.
#!/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