Certbot not found

Stillmatic1985 picture Stillmatic1985 · Oct 21, 2016 · Viewed 15.6k times · Source

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 certbotor is there an alternative command for letsencrypt to define such hooks?

Thanks

Answer

Stillmatic1985 picture Stillmatic1985 · Oct 24, 2016

Ok i found the solution..

git clone [email protected]:certbot/certbot.git

cd certbot

./certbot-auto renew --pre-hook "service nginx stop" --post-hook "service nginx start"