The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

init_certbot.sh 742 B

4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
1234567891011121314151617
  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  4. #
  5. LE_EMAIL="${1}"
  6. SERVER_NAME="${2}"
  7. SERVER_ALIAS="${3}"
  8. if [[ $(find /etc/letsencrypt/accounts -type f -name regr.json | xargs grep -l \"${LE_EMAIL}\" | wc -l | tr -d ' ') -eq 0 ]] ; then
  9. certbot register --agree-tos -m "${LE_EMAIL}" --non-interactive
  10. fi
  11. if [[ ! -f /etc/letsencrypt/live/${SERVER_NAME}/fullchain.pem || ! -f /etc/letsencrypt/live/${SERVER_ALIAS}/fullchain.pem ]] ; then
  12. certbot certonly --standalone --non-interactive -d ${SERVER_NAME}
  13. certbot certonly --standalone --non-interactive -d ${SERVER_ALIAS}
  14. else
  15. certbot renew --standalone --non-interactive
  16. fi