Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
SiwatS authored Mar 31, 2022
1 parent 83f0273 commit f4fff97
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ curl -X PUT --data-binary @/software/unit.json --unix-socket /var/run/control-un
#Request Certificate
certbot certonly --test-cert --webroot --agree-tos -m $EMAIL -n -w /ssl/certbotroot -d $DOMAIN_NAME &&

#Upload Certificate to NGINX Unit
curl -X PUT --data-binary @/etc/letsencrypt/live/$DOMAIN_NAME/fullchain.pem --unix-socket /var/run/control-unit.sock http://localhost/certificates/primary
#Construct and Upload Certificate to NGINX Unit
cat /etc/letsencrypt/live/$DOMAIN_NAME/fullchain.pem > fullcert.pem
cat /etc/letsencrype/live/$DOMAIN_NAME/privkey.pem >> fullcert.pem
curl -X PUT --data-binary @fullcert.pem --unix-socket /var/run/control-unit.sock http://localhost/certificates/primary

#Apply SSL Partial Configuration
curl -X PUT --data-binary @/software/ssl-listener.json --unix-socket /var/run/control-unit.sock 'http://localhost/config/listener/%2A%3A443' &&
Expand Down

0 comments on commit f4fff97

Please sign in to comment.