Answer the question
In order to leave comments, you need to log in
How to automatically pass data to bash script?
started to deal with ssl certificates letsencrypt.org
set up everything set up but then the plug came out with automatic re-release
, you can run the bash script in the cron
#!/bin/sh
CONFIG_NAME=$1
MODE_RUN=$2
cd /opt/letsencrypt/
./certbot-auto --config /etc/letsencrypt/configs/$CONFIG_NAME.conf $MODE_RUN
if [ $? -ne 0 ]
then
ERRORLOG=`tail /var/log/letsencrypt/letsencrypt.log`
echo -e "The Let's Encrypt cert has not been renewed! \n \n" \
$ERRORLOG
else
nginx -s reload
fi
exit 0
What would you like to do?
-------------------------------------------------- -----------------------------
1: Keep the existing certificate for now
2: Renew & replace the cert (limit ~5 per 7 days)
------------------------------------------------ -------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel):
Answer the question
In order to leave comments, you need to log in
--force-renewal, --renew-by-default
If a certificate already exists for the requested
domains, renew it now, regardless of whether it is
near expiry. (Often --keep-until-expiring is more
appropriate). Also implies --expand. (default: False)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question