script de renouvellement certificat
This commit is contained in:
parent
8f07dc6185
commit
a40f922246
10
roles/deploy-web/files/check_ssl.sh
Normal file
10
roles/deploy-web/files/check_ssl.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
expire=$(echo | openssl s_client -connect clarissariviere.com:443 2>/dev/null | openssl x509 -noout -enddate |awk -F "=" '{print $2}')
|
||||
timeExpire=$(date --date="${expire}" +%s)
|
||||
now=$(date +%s)
|
||||
|
||||
if [ ${now} -gt ${timeExpire} ]; then
|
||||
certbot renew
|
||||
echo "Certificat renouvellé" | mail -s "certificat renouvelle" valczebackup@gmail.com
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user