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
Ok i found the solution..
git clone git@github.com:certbot/certbot.git
cd certbot
./certbot-auto renew --pre-hook "service nginx stop" --post-hook "service nginx start"