2016-02-19 21:13:25 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# Modified script from here: https://github.com/FarsetLabs/letsencrypt-helper-scripts/blob/master/letsencrypt-unifi.sh
|
|
|
|
# Modified by: Brielle Bruns <bruns@2mbit.com>
|
2016-02-27 14:19:29 -07:00
|
|
|
# Download URL: https://source.sosdg.org/brielle/lets-encrypt-scripts
|
2024-03-24 20:42:31 -06:00
|
|
|
# Version: 1.99.10
|
|
|
|
# Last Changed: 03/24/2024
|
2016-02-27 14:19:29 -07:00
|
|
|
# 02/02/2016: Fixed some errors with key export/import, removed lame docker requirements
|
|
|
|
# 02/27/2016: More verbose progress report
|
2016-03-08 12:04:03 -07:00
|
|
|
# 03/08/2016: Add renew option, reformat code, command line options
|
2016-03-24 18:55:56 -06:00
|
|
|
# 03/24/2016: More sanity checking, embedding cert
|
2017-10-23 12:16:43 -06:00
|
|
|
# 10/23/2017: Apparently don't need the ace.jar parts, so disable them
|
2018-02-04 19:34:13 -07:00
|
|
|
# 02/04/2018: LE disabled tls-sni-01, so switch to just tls-sni, as certbot 0.22 and later automatically fall back to http/80 for auth
|
2018-05-29 14:35:37 -06:00
|
|
|
# 05/29/2018: Integrate patch from Donald Webster <fryfrog[at]gmail.com> to cleanup and improve tests
|
2018-09-26 10:25:30 -06:00
|
|
|
# 09/26/2018: Change from TLS to HTTP authenticator
|
2021-09-22 15:07:33 -06:00
|
|
|
# 09/22/2021: Update root certs
|
2021-10-10 22:03:53 -06:00
|
|
|
# 10/10/2021: Split out import process for root certs, and fix quirkiness with cert chains
|
2021-10-11 08:11:30 -06:00
|
|
|
# 10/11/2021: Minor fixes, add keystore cli opt, variable references
|
2024-03-24 20:42:31 -06:00
|
|
|
# 03/24/2024: Adds legacy option for OpenSSL 3.x to fix issue with keystore format
|
2018-05-29 14:35:37 -06:00
|
|
|
|
|
|
|
# Location of LetsEncrypt binary we use. Leave unset if you want to let it find automatically
|
|
|
|
#LEBINARY="/usr/src/letsencrypt/certbot-auto"
|
2016-02-27 14:19:29 -07:00
|
|
|
|
2016-03-01 11:44:35 -07:00
|
|
|
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
|
|
|
|
2021-10-11 08:13:06 -06:00
|
|
|
KEYSTORE="/usr/lib/unifi/data/keystore"
|
2021-10-10 21:24:10 -06:00
|
|
|
|
|
|
|
|
2018-05-29 14:35:37 -06:00
|
|
|
function usage() {
|
2024-03-24 20:42:31 -06:00
|
|
|
echo "Usage: $0 -d <domain> [-e <email>] [-r] [-i] [-k <keystore>] [-l]"
|
2018-05-29 14:35:37 -06:00
|
|
|
echo " -d <domain>: The domain name to use."
|
|
|
|
echo " -e <email>: Email address to use for certificate."
|
|
|
|
echo " -r: Renew domain."
|
|
|
|
echo " -i: Insert only, use to force insertion of certificate."
|
2021-10-11 08:11:30 -06:00
|
|
|
echo " -k: Specify keystore to use."
|
|
|
|
echo " -h: This usage description."
|
2024-03-24 20:42:31 -06:00
|
|
|
echo " -l: Use OpenSSL 3.x legacy option."
|
2018-05-29 14:35:37 -06:00
|
|
|
}
|
|
|
|
|
2021-10-11 08:11:30 -06:00
|
|
|
while getopts "hird:e:k:" opt; do
|
2018-05-29 14:35:37 -06:00
|
|
|
case $opt in
|
2016-03-24 18:55:56 -06:00
|
|
|
i) onlyinsert="yes";;
|
2016-03-08 12:04:03 -07:00
|
|
|
r) renew="yes";;
|
|
|
|
d) domains+=("$OPTARG");;
|
2018-05-29 14:35:37 -06:00
|
|
|
e) email="$OPTARG";;
|
2021-10-11 08:11:30 -06:00
|
|
|
k) userkeystore="$OPTARG";;
|
2024-03-24 20:42:31 -06:00
|
|
|
l) uselegacy="yes";;
|
2018-05-29 14:35:37 -06:00
|
|
|
h) usage
|
|
|
|
exit;;
|
|
|
|
esac
|
2016-03-08 12:04:03 -07:00
|
|
|
done
|
2016-02-27 14:19:29 -07:00
|
|
|
|
2017-03-21 16:22:31 -06:00
|
|
|
DEFAULTLEBINARY="/usr/bin/certbot /usr/bin/letsencrypt /usr/sbin/certbot
|
2018-05-29 14:35:37 -06:00
|
|
|
/usr/sbin/letsencrypt /usr/local/bin/certbot /usr/local/sbin/certbot
|
|
|
|
/usr/local/bin/letsencrypt /usr/local/sbin/letsencrypt
|
|
|
|
/usr/src/letsencrypt/certbot-auto /usr/src/letsencrypt/letsencrypt-auto
|
|
|
|
/usr/src/certbot/certbot-auto /usr/src/certbot/letsencrypt-auto
|
|
|
|
/usr/src/certbot-master/certbot-auto /usr/src/certbot-master/letsencrypt-auto"
|
2017-03-21 16:22:31 -06:00
|
|
|
|
|
|
|
if [[ ! -v LEBINARY ]]; then
|
2018-05-29 14:35:37 -06:00
|
|
|
for i in ${DEFAULTLEBINARY}; do
|
|
|
|
if [[ -x ${i} ]]; then
|
|
|
|
LEBINARY=${i}
|
|
|
|
echo "Found LetsEncrypt/Certbot binary at ${LEBINARY}"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2017-03-21 16:22:31 -06:00
|
|
|
fi
|
2016-02-27 14:19:29 -07:00
|
|
|
|
2016-03-24 18:55:56 -06:00
|
|
|
# Command line options depending on New or Renew.
|
2016-03-08 12:04:03 -07:00
|
|
|
NEWCERT="--renew-by-default certonly"
|
|
|
|
RENEWCERT="-n renew"
|
|
|
|
|
2018-05-29 14:35:37 -06:00
|
|
|
# Check for required binaries
|
2016-03-24 18:55:56 -06:00
|
|
|
if [[ ! -x ${LEBINARY} ]]; then
|
2018-05-29 14:35:37 -06:00
|
|
|
echo "Error: LetsEncrypt binary not found in ${LEBINARY} !"
|
|
|
|
echo "You'll need to do one of the following:"
|
|
|
|
echo "1) Change LEBINARY variable in this script"
|
|
|
|
echo "2) Install LE manually or via your package manager and do #1"
|
|
|
|
echo "3) Use the included get-letsencrypt.sh script to install it"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ! -x $( which keytool ) ]]; then
|
|
|
|
echo "Error: Java keytool binary not found."
|
|
|
|
exit 1
|
2016-03-24 18:55:56 -06:00
|
|
|
fi
|
|
|
|
|
2018-05-29 14:35:37 -06:00
|
|
|
if [[ ! -x $( which openssl ) ]]; then
|
|
|
|
echo "Error: OpenSSL binary not found."
|
|
|
|
exit 1
|
|
|
|
fi
|
2016-03-24 18:55:56 -06:00
|
|
|
|
2024-03-24 20:42:31 -06:00
|
|
|
if [[ ! -z ${uselegacy} ]]; then
|
|
|
|
osslopt=" -legacy"
|
|
|
|
else
|
|
|
|
osslopt=""
|
|
|
|
fi
|
|
|
|
|
2016-03-08 12:04:03 -07:00
|
|
|
if [[ ! -z ${email} ]]; then
|
2018-05-29 14:35:37 -06:00
|
|
|
email="--email ${email}"
|
2016-03-08 12:04:03 -07:00
|
|
|
else
|
2018-05-29 14:35:37 -06:00
|
|
|
email=""
|
2016-03-08 12:04:03 -07:00
|
|
|
fi
|
|
|
|
|
2021-10-11 08:11:30 -06:00
|
|
|
if [[ ! -z ${userkeystore} ]]; then
|
|
|
|
KEYSTORE="${userkeystore}"
|
|
|
|
fi
|
|
|
|
|
2016-03-08 12:04:03 -07:00
|
|
|
shift $((OPTIND -1))
|
|
|
|
for val in "${domains[@]}"; do
|
|
|
|
DOMAINS="${DOMAINS} -d ${val} "
|
|
|
|
done
|
|
|
|
|
2016-03-08 12:21:26 -07:00
|
|
|
MAINDOMAIN=${domains[0]}
|
2016-03-08 12:04:03 -07:00
|
|
|
|
2016-03-24 18:59:12 -06:00
|
|
|
if [[ -z ${MAINDOMAIN} ]]; then
|
2018-05-29 14:35:37 -06:00
|
|
|
echo "Error: At least one -d argument is required"
|
|
|
|
usage
|
|
|
|
exit 1
|
2016-03-24 18:55:56 -06:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ${renew} == "yes" ]]; then
|
2018-05-29 14:35:37 -06:00
|
|
|
LEOPTIONS="${RENEWCERT}"
|
2016-03-08 12:04:03 -07:00
|
|
|
else
|
2018-05-29 14:35:37 -06:00
|
|
|
LEOPTIONS="${email} ${DOMAINS} ${NEWCERT}"
|
2016-03-08 12:04:03 -07:00
|
|
|
fi
|
2016-02-27 14:19:29 -07:00
|
|
|
|
2016-03-24 18:55:56 -06:00
|
|
|
if [[ ${onlyinsert} != "yes" ]]; then
|
2018-09-26 10:25:30 -06:00
|
|
|
echo "Firing up standalone authenticator on TCP port 80 and requesting cert..."
|
2021-10-11 08:11:30 -06:00
|
|
|
${LEBINARY} --agree-tos --standalone --preferred-challenges http ${LEOPTIONS}
|
2018-05-29 14:35:37 -06:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ${onlyinsert} != "yes" ]] && md5sum -c "/etc/letsencrypt/live/${MAINDOMAIN}/cert.pem.md5" &>/dev/null; then
|
|
|
|
echo "Cert has not changed, not updating controller."
|
|
|
|
exit 0
|
2016-03-08 12:04:03 -07:00
|
|
|
else
|
2018-05-29 14:35:37 -06:00
|
|
|
echo "Cert has changed or -i option was used, updating controller..."
|
|
|
|
TEMPFILE=$(mktemp)
|
|
|
|
CATEMPFILE=$(mktemp)
|
2021-10-10 21:24:10 -06:00
|
|
|
INTERMEDTEMPFILE=$(mktemp)
|
2016-03-24 18:55:56 -06:00
|
|
|
|
2021-10-10 21:24:10 -06:00
|
|
|
# ISRG Root X1
|
2018-05-29 14:35:37 -06:00
|
|
|
cat > "${CATEMPFILE}" <<'_EOF'
|
2016-03-24 18:55:56 -06:00
|
|
|
-----BEGIN CERTIFICATE-----
|
2021-10-10 21:56:37 -06:00
|
|
|
MIIFYDCCBEigAwIBAgIQQAF3ITfU6UK47naqPGQKtzANBgkqhkiG9w0BAQsFADA/
|
|
|
|
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
|
|
|
|
DkRTVCBSb290IENBIFgzMB4XDTIxMDEyMDE5MTQwM1oXDTI0MDkzMDE4MTQwM1ow
|
2021-09-22 15:07:33 -06:00
|
|
|
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR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
|
|
|
gt8TAQEBMA0GCSqGSIb3DQEBCwUAA4ICAQCFyk5HPqP3hUSFvNVneLKYY611TR6W
|
|
|
|
PTNlclQtgaDqw+34IL9fzLdwALduO/ZelN7kIJ+m74uyA+eitRY8kc607TkC53wl
|
|
|
|
ikfmZW4/RvTZ8M6UK+5UzhK8jCdLuMGYL6KvzXGRSgi3yLgjewQtCPkIVz6D2QQz
|
|
|
|
CkcheAmCJ8MqyJu5zlzyZMjAvnnAT45tRAxekrsu94sQ4egdRCnbWSDtY7kh+BIm
|
|
|
|
lJNXoB1lBMEKIq4QDUOXoRgffuDghje1WrG9ML+Hbisq/yFOGwXD9RiX8F6sw6W4
|
|
|
|
avAuvDszue5L3sz85K+EC4Y/wFVDNvZo4TYXao6Z0f+lQKc0t8DQYzk1OXVu8rp2
|
|
|
|
yJMC6alLbBfODALZvYH7n7do1AZls4I9d1P4jnkDrQoxB3UqQ9hVl3LEKQ73xF1O
|
|
|
|
yK5GhDDX8oVfGKF5u+decIsH4YaTw7mP3GFxJSqv3+0lUFJoi5Lc5da149p90Ids
|
|
|
|
hCExroL1+7mryIkXPeFM5TgO9r0rvZaBFOvV2z0gp35Z0+L4WPlbuEjN/lxPFin+
|
|
|
|
HlUjr8gRsI3qfJOQFy/9rKIJR0Y/8Omwt/8oTWgy1mdeHmmjk7j1nYsvC9JSQ6Zv
|
|
|
|
MldlTTKB3zhThV1+XWYp6rjd5JW1zbVWEkLNxE7GJThEUG3szgBVGP7pSWTUTsqX
|
|
|
|
nLRbwHOoq7hHwg==
|
|
|
|
-----END CERTIFICATE-----
|
2016-03-24 18:55:56 -06:00
|
|
|
_EOF
|
|
|
|
|
2018-05-29 14:35:37 -06:00
|
|
|
md5sum "/etc/letsencrypt/live/${MAINDOMAIN}/cert.pem" > "/etc/letsencrypt/live/${MAINDOMAIN}/cert.pem.md5"
|
2021-10-10 21:24:10 -06:00
|
|
|
#echo "Using openssl to prepare certificate..."
|
|
|
|
#cat "/etc/letsencrypt/live/${MAINDOMAIN}/chain.pem" >> "${CATEMPFILE}"
|
2024-03-24 20:42:31 -06:00
|
|
|
openssl pkcs12 -export ${osslopt} -passout pass:aircontrolenterprise \
|
2021-10-10 22:01:51 -06:00
|
|
|
-in "/etc/letsencrypt/live/${MAINDOMAIN}/fullchain.pem" \
|
2018-05-29 14:35:37 -06:00
|
|
|
-inkey "/etc/letsencrypt/live/${MAINDOMAIN}/privkey.pem" \
|
2021-10-10 21:24:10 -06:00
|
|
|
-out "${TEMPFILE}" -name unifi
|
|
|
|
|
2018-05-29 14:35:37 -06:00
|
|
|
echo "Stopping Unifi controller..."
|
|
|
|
service unifi stop
|
2021-10-10 21:24:10 -06:00
|
|
|
|
2021-10-10 21:43:15 -06:00
|
|
|
echo "Removing existing certificates from Unifi protected keystore..."
|
|
|
|
keytool -delete -alias unifi -keystore "${KEYSTORE}" \
|
|
|
|
-deststorepass aircontrolenterprise -noprompt
|
|
|
|
keytool -delete -alias root -keystore "${KEYSTORE}" \
|
|
|
|
-deststorepass aircontrolenterprise -noprompt
|
|
|
|
keytool -delete -alias intermediate1 -keystore "${KEYSTORE}" \
|
|
|
|
-deststorepass aircontrolenterprise -noprompt
|
|
|
|
|
2021-10-10 21:24:10 -06:00
|
|
|
echo "Importing root LE CA cert and intermediaries..."
|
|
|
|
keytool -import -trustcacerts -alias root -file "${CATEMPFILE}" \
|
2021-10-10 21:35:00 -06:00
|
|
|
-storepass aircontrolenterprise -keystore "${KEYSTORE}" -noprompt
|
2021-10-10 21:24:10 -06:00
|
|
|
|
|
|
|
keytool -import -trustcacerts -alias intermediate1 -file "${INTERMEDTEMPFILE}" \
|
2021-10-10 21:35:00 -06:00
|
|
|
-storepass aircontrolenterprise -keystore "${KEYSTORE}" -noprompt
|
2021-10-10 21:24:10 -06:00
|
|
|
|
2018-05-29 14:35:37 -06:00
|
|
|
|
2021-10-10 21:24:10 -06:00
|
|
|
echo "Importing certificate into Unifi keystore..."
|
|
|
|
keytool -importkeystore \
|
2018-05-29 14:35:37 -06:00
|
|
|
-deststorepass aircontrolenterprise \
|
|
|
|
-destkeypass aircontrolenterprise \
|
2021-10-11 08:11:30 -06:00
|
|
|
-destkeystore ${KEYSTORE} \
|
2018-05-29 14:35:37 -06:00
|
|
|
-srckeystore "${TEMPFILE}" -srcstoretype PKCS12 \
|
|
|
|
-srcstorepass aircontrolenterprise \
|
2021-10-10 21:35:00 -06:00
|
|
|
-alias unifi -noprompt
|
2021-10-10 21:24:10 -06:00
|
|
|
rm -f "${TEMPFILE}" "${CATEMPFILE}" "${INTERMEDTEMPFILE}"
|
2018-05-29 14:35:37 -06:00
|
|
|
|
|
|
|
echo "Starting Unifi controller..."
|
|
|
|
service unifi start
|
|
|
|
|
|
|
|
echo "Done!"
|
|
|
|
fi
|