Certbot-auto 'not found' - renewal error

Please fill out the fields below so we can help you better.

https://malcolmmellor.com

I ran this crontab script:
MAILTO=mtwebink@gmail.com
0 */12 * * * /usr/local/bin/certbot-auto renew --quiet --no-self-upgrade
–post-hook “/sbin/service nginx reload”

It produced this output:
/bin/sh: 1: /usr/local/bin/certbot-auto: not found

OS:
Ubuntu 14.04
Serverpilot

My web server is:
NGINX (latest version from 2 weeks ago)

I can login to a root shell on my machine:
yes

I’m using a control panel:
putty

Hi,

How did you install certbot ? The location you are using is incorrect, so basically we just need to find tethe correct location.

if you used the certbot instructions at https://certbot.eff.org/#ubuntutrusty-nginx then the location which be whichever folder you were in when you did the

wget https://dl.eff.org/certbot-auto

command ( rather than /usr/local/bin )

Hi,
Thank you for your prompt reply.
I think I must have been in the root dir when I installed it. See below is a screen shot


So, would I be correct in saying that I just need to change that path to
/certbot/certbot-auto

?
Thank you.
Best, Mike

Yes, the path should be

/root/certbot/certbot-auto

if you were logged in as root.

Thank you, that worked, but now it’s not recognising the post hook, I received the following error:

Unable to find post-hook command /sbin/service in the PATH.
(PATH is /usr/bin:/bin)

Shall I submit another ticket for this? Sorry!

Thank you,
Best wishes, Mike

typically the service command is in /usr/sbin so it would be “/usr/sbin/service nginx reload”

if you type “which service” or “whereis service” it should tell you the path

1 Like

Just to let you know that worked, I couldn’t have done it without you. Thank you!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.