Mon script de renouvellement de certificat pour tous mes sous-domaines
This commit is contained in:
parent
50b86f8902
commit
9944ce37de
16
cron.letsencrypt.sh
Normal file
16
cron.letsencrypt.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Renew Let's Encrypt SSL cert
|
||||||
|
|
||||||
|
domains=( "freelance" "blog" "code" "bookmarklet" "cv" "dav" "flashforward" "flashnext" "git" "labs" "nemo" "portfolio" "tumblr" "wiki" )
|
||||||
|
|
||||||
|
for i in "${domains[@]}"
|
||||||
|
do
|
||||||
|
full="$i.shikiryu.com"
|
||||||
|
path/to/letsencrypt-auto -d "$full" --renew-by-default --no-redirect --text
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
ERRORLOG=`tail /var/log/letsencrypt/letsencrypt.log`
|
||||||
|
echo -e "The Lets Encrypt Cert for $full has not been renewed! \n \n" $ERRORLOG | mail -s "Lets Encrypt Cert Alert" mail@example.fr
|
||||||
|
fi
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user