Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
SiwatS authored Apr 5, 2022
1 parent 241514a commit 5b4c2fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ curl -X PUT --data-binary @/software/unit.json --unix-socket /var/run/control-un
(certbot certonly --webroot --agree-tos -m $EMAIL -n -w /ssl/certbotroot -d $DOMAIN_NAME || :) &&

#Construct and Upload Certificate to NGINX Unit
cat /etc/letsencrypt/live/$DOMAIN_NAME/fullchain.pem > fullcert.pem &&
cat /etc/letsencrypt/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 &&
(cat /etc/letsencrypt/live/$DOMAIN_NAME/fullchain.pem > fullcert.pem || :) &&
(cat /etc/letsencrypt/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/listeners/*:443' &&
(curl -X PUT --data-binary @/software/ssl-listener.json --unix-socket /var/run/control-unit.sock 'http://localhost/config/listeners/*:443' || :) &&

#Idle Forever
tail -f /dev/null

0 comments on commit 5b4c2fe

Please sign in to comment.