add ONE_SHOT so container exits after run
This commit is contained in:
@ -761,9 +761,19 @@ then
|
||||
openssl dhparam -out /config/letsencrypt/keys/ssl-dhparams.pem 4096
|
||||
fi
|
||||
|
||||
echo "$INTERVAL /certbot-renew.sh >> /config/logs/renew.log" > /config/.crontab.txt
|
||||
if [ $ONE_SHOT == "true" ]; then
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
echo "Starting automatic renewal job. Schedule is $INTERVAL"
|
||||
crontab /config/.crontab.txt
|
||||
echo "ONE_SHOT is true - exiting container"
|
||||
|
||||
elif [ $ONE_SHOT == "false" ]; then
|
||||
|
||||
echo "$INTERVAL /certbot-renew.sh >> /config/logs/renew.log" > /config/.crontab.txt
|
||||
|
||||
echo ""
|
||||
|
||||
echo "Starting automatic renewal job. Schedule is $INTERVAL"
|
||||
crontab /config/.crontab.txt
|
||||
|
||||
fi
|
Reference in New Issue
Block a user