Skip to content

Instantly share code, notes, and snippets.

@marcelo-ochoa
Created December 15, 2020 20:09
Show Gist options
  • Save marcelo-ochoa/f126232e46c075c6ecbc4ea5ee34f060 to your computer and use it in GitHub Desktop.
Save marcelo-ochoa/f126232e46c075c6ecbc4ea5ee34f060 to your computer and use it in GitHub Desktop.
#!/bin/sh
cd /etc/letsencrypt
cert_number=$(ls csr/|tail -1|sed s/_.*//)
cert_name=$RENEWED_DOMAINS-$cert_number
echo $cert_name
oci lb certificate create --load-balancer-id $OCID --certificate-name $cert_name --public-certificate-file /etc/letsencrypt/live/$RENEWED_DOMAINS/fullchain.pem --private-key-file /etc/letsencrypt/live/$RENEWED_DOMAINS/privkey.pem
sleep 30
oci lb listener update --force --listener-name lb_ssl --default-backend-set-name bs_default --port 443 --protocol HTTP --load-balancer-id $OCID --ssl-certificate-name $cert_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment