User Tools

Site Tools


letsencrypt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
letsencrypt [2020/11/09 13:14]
admin
letsencrypt [2022/06/01 12:40]
admin
Line 21: Line 21:
 #!/bin/bash #!/bin/bash
 #​RENEWED_LINEAGE=/​etc/​letsencrypt/​live/​site.com #​RENEWED_LINEAGE=/​etc/​letsencrypt/​live/​site.com
-/​usr/​bin/​curl --data-urlencode "​certificate=`cat ${RENEWED_LINEAGE}/​cert.pem`"​ --data-urlencode "​chain=`cat ${RENEWED_LINEAGE}/​chain.pem`"​ --data-urlencode "​privatekey=`cat ${RENEWED_LINEAGE}/​privkey.pem`"​ https://​api.confiared.com/​reverse-proxy/​upload-certificate -o /​var/​log/​last_letsencrypt_confiared_api.log+if [ ! -f ${RENEWED_LINEAGE}/​cert.pem ] 
 +then 
 +  echo "​${RENEWED_LINEAGE}/​cert.pem was not found, abort" > /​var/​log/​last_letsencrypt_confiared_api.log 
 +  echo "​${RENEWED_LINEAGE}/​cert.pem was not found, abort" >> /​var/​log/​last_letsencrypt_confiared_api.err 
 +  exit 255 
 +fi 
 +/​usr/​bin/​curl ​--silent ​--data-urlencode "​certificate=`cat ${RENEWED_LINEAGE}/​cert.pem`"​ --data-urlencode "​chain=`cat ${RENEWED_LINEAGE}/​chain.pem`"​ --data-urlencode "​privatekey=`cat ${RENEWED_LINEAGE}/​privkey.pem`"​ https://​api.confiared.com/​reverse-proxy/​upload-certificate -o /​var/​log/​last_letsencrypt_confiared_api.log 
 +if [ $? -ne 0 ] 
 +then 
 +  # try 99 times 
 +  for i in {1..99} 
 +  do 
 +    sleep 600 
 +    /​usr/​bin/​curl --silent --data-urlencode "​certificate=`cat ${RENEWED_LINEAGE}/​cert.pem`"​ --data-urlencode "​chain=`cat ${RENEWED_LINEAGE}/​chain.pem`"​ --data-urlencode "​privatekey=`cat ${RENEWED_LINEAGE}/​privkey.pem`"​ https://​api.confiared.com/​reverse-proxy/​upload-certificate -o /​var/​log/​last_letsencrypt_confiared_api.log 
 +    if [ $? -ne 0 ] 
 +    then 
 +      exit 0 
 +    fi 
 +  done 
 +fi
 </​code>​ </​code>​
  
letsencrypt.txt · Last modified: 2022/06/01 12:40 by admin