Created
February 23, 2016 18:46
-
-
Save sebva/c2a8a2cf1b3157684a07 to your computer and use it in GitHub Desktop.
Renew/assign a Let's Encrypt certificate on an HP iLO 4 system
This file contains 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/zsh | |
# Needs https://github.com/lukas2511/letsencrypt.sh in dns-01 mode | |
/opt/letsencrypt/ilo/letsencrypt.sh -c -s /opt/letsencrypt/ilo/ilo.csr -k /opt/letsencrypt/ilo/hook.sh -t dns-01 > /opt/letsencrypt/ilo/ilo.crt | |
cert=$(cat /opt/letsencrypt/ilo/ilo.crt) | |
curl --cacert /opt/letsencrypt/intermediate.pem -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [FILL_IN_HERE]" -X POST -d "{\"Action\": \"ImportCertificate\", \"Certificate\": \"$cert\"}" https://ilo.home.vaucher.org/rest/v1/Managers/1/SecurityService/HttpsCert |
Can you describe how you generate intermediate.pem? Is the hook.sh script creating it?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@sebva the dependency repo https://github.com/lukas2511/letsencrypt.sh has been moved to https://github.com/lukas2511/dehydrated