This goes in /etc/letsencrypt/renewal-hooks/deploy/
and makes certbot-renewed certificates
available for Cockpit (RHEL, Fedora, Oracle, AlmaLinux, Rocky).
Created
June 19, 2024 19:02
-
-
Save frederickding/fe9ddf5dece07cc12daf537ed84707e6 to your computer and use it in GitHub Desktop.
certbot cockpit deploy script
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
#!/usr/bin/env bash | |
DOMAIN=`basename "$RENEWED_LINEAGE"` | |
case $DOMAIN in | |
host.example.com) | |
echo "Host certs renewed" | |
cp $RENEWED_LINEAGE/fullchain.pem /etc/cockpit/ws-certs.d/$DOMAIN.crt | |
cp $RENEWED_LINEAGE/privkey.pem /etc/cockpit/ws-certs.d/$DOMAIN.key | |
chown cockpit-ws:cockpit-ws /etc/cockpit/ws-certs.d/$DOMAIN.crt /etc/cockpit/ws-certs.d/$DOMAIN.key | |
echo "Restarting Cockpit" | |
systemctl restart cockpit | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment