Problem with PATH and cronjob

Hello!

Executing a cronjob for letsencrypt-auto fails with

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

I put the comand in a wrapper.sh and gave

PATH=/bin:/usr/bin:/root/letsencrypt/certbot-master

but that did not succed finding the pre-hook command.

What must be done?

Greetings

Hi @porrier, you might have the service command in /usr/sbin instead (try which service to find out). In that case, that will need to be in your PATH too.

1 Like

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