Created
September 15, 2021 07:56
-
-
Save bartclone/d4ad3994511577454853540aa487dfea to your computer and use it in GitHub Desktop.
Copy LE certificate/key to Cockpit
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
# SCRAP/UNFINISHED | |
#Source: | |
#Comment on https://crosstalksolutions.com/definitive-guide-to-hosted-unifi-2021/ | |
#By Binky | |
#Using info here: https://ryan.lovelett.me/posts/letsencrypt-cockpit/ | |
#I created the file: /etc/letsencrypt/renewal-hooks/post/001-restart-cockpit.sh | |
#With the provided contents, changing ‘$FQDN’ with my FQDN for the instance and removing the ‘chown’ statement: | |
# ——————————————————————————– | |
#!/usr/bin/env bash | |
echo “SSL certificates renewed” | |
cp /etc/letsencrypt/live/$FQDN/fullchain.pem /etc/cockpit/ws-certs.d/$FQDN.crt | |
cp /etc/letsencrypt/live/$FQDN/privkey.pem /etc/cockpit/ws-certs.d/$FQDN.key | |
echo “Restarting Cockpit” | |
systemctl restart cockpit | |
——————————————————————————– | |
Then ran the script (after chmod +x /etc/letsencrypt/renewal-hooks/post/001-restart-cockpit.sh) as root and Cockpit now uses my LetsEncrypt certificate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment