i installed letsencrypt on my ubuntu 16.04 machine with following command.
sudo apt-get install letsencrypt
Now, i want to define a cronjob to automatically renew my certs with following line.
certbot renew --pre-hook "service nginx stop" --post-hook "service nginx start"
But i always get the error, that the command certbot could not be found.
If i use letsencrypt instead of certbot everything works fine as long as i dont use the --pre-hook
and --post-hook
.
How to install certbot
or is there an alternative command for letsencrypt to define such hooks?
Thanks
For me the following commands working fine.
Install snap
sudo apt update
sudo apt install snapd
Install Core
sudo snap install core
Install Certbot
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
Renew Certbot
sudo certbot renew --dry-run
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With