By samoshi
I update it manually using this command
sudo systemctl stop nginx
url="my_domain123.com"
sudo certbot certonly --standalone -d $url -d www.$url --email main@$url
sudo systemctl start nginx
This works fine, but it’s manual. If I create a bash script with this code and a cron task which I’ll call once in [80…89] days, will it work as I expect? With no hidden issues?
Note: this works fine when doing it manually - by hands. I only want to automate it using cron, in a simple way, without overcomlecating it.
No third-party libraries and tools.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
If you are using Certbot it should already be setup to auto renew. I’m using Ubuntu 16.04 & nginx, followed the instructions to setup certbot, and my certs have been auto renewing.
Use this link to find instructions for your stack: https://certbot.eff.org/all-instructions
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.