Created
December 20, 2020 05:15
-
-
Save davidbalbert/a6db84e357931a16835c40128979a9dc to your computer and use it in GitHub Desktop.
UniFi Certificate - acme.sh + Route 53
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
# Run this once in your shell. All access keys and all settings will be saved by acme.sh | |
DOMAIN=unifi.example.com | |
AWS_ACCESS_KEY_ID=foo AWS_SECRET_ACCESS_KEY=bar acme.sh \ | |
--issue -d $DOMAIN \ | |
--dns dns_aws \ | |
--fullchain-file /tmp/$DOMAIN.crt \ | |
--key-file /tmp/$DOMAIN.key \ | |
--reloadcmd /path/to/unifi-import-certificate.sh |
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/sh | |
set -e | |
DOMAIN=unifi.example.com | |
UNIFI_HOME=/usr/lib/unifi | |
sudo java -jar $UNIFI_HOME/lib/ace.jar import_key_cert /tmp/$DOMAIN.key /tmp/$DOMAIN.crt | |
sudo service unifi restart | |
rm -f /tmp/$DOMAIN.* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment