# certbot-2.7: Command not found



## Jailer (Aug 6, 2020)

I've been having a problem getting certbot to run from a script to handle renewals that I've been using for a couple years that has ran without issue in the past. Seems something broke in the latest package version of py27-certbot so I uninstalled it and installed py37-certbot. I'm running this in a jail on FreeNAS. When I run the command in the script from the terminal it runs fine without error. When trying to run the exact same command from my script via a cron task set in the GUI it's seems to still be trying to run py27-certbot which isn't installed and of course returns an error. This is run from a jail I have set up to handle my nginx reverse proxy. Nginx, openssl111 and certbot (and it's dependencies) are all that's installed in this jail.

The error:

```
/usr/local/bin/certbot-2.7: Command not found.
Command: csh /renew.sh failed!
```

The script:

```
#!/bin/sh
/usr/local/bin/certbot renew --post-hook "service nginx restart" --quiet
```

The only thing I've been able to find online remotely similar is this thread but trying the things listed there didn't help.

I don't know what to do to fix this. The simlink seems fine so I don't know what is triggering certbot to try to use the older version that is no longer installed. How do I go about debugging this? The letsencrypt error log isn't much help.


----------



## George (Aug 7, 2020)

> When trying to run the exact same command from my script via a cron task set in the GUI it's seems to still be trying to run py27-certbot



cron has a GUI?
Do you have /usr/local/etc/periodic/weekly/*.certbot?


----------



## Jailer (Aug 7, 2020)

Elazar said:


> cron has a GUI?


No FreeNAS does. I'm running this in a jail on FreeNAS. The cron task is set up in the GUI on FreeNAS. 


Elazar said:


> Do you have /usr/local/etc/periodic/weekly/*.certbot?


No I do not.


----------



## SirDice (Aug 7, 2020)

Please note that FreeNAS is not supported here.

PC-BSD, FreeNAS, XigmaNAS, and all other FreeBSD Derivatives


----------

