caktus / margarita

A collection of delicious Salt states for Django project deployments.
BSD 3-Clause "New" or "Revised" License
34 stars 8 forks source link

Add /usr/local/bin to path for certbot cron job #157

Closed dpoirier closed 7 years ago

dpoirier commented 7 years ago

Certificate renewals seemed to be failing on a site due to this. Error output from the failed renewal indicated difficulty finding virtualenv, which was at /usr/local/bin/. The path was just /usr/bin:/bin.

dpoirier commented 7 years ago

Or maybe it would be better to set the PATH in the root crontab somewhere more universal than just for this one cron job?

vkurup commented 7 years ago

Hmmm.... I'd be interested in seeing the error, if you still have it, for future reference.

If we're going to set the PATH, either on the command line or more universally, we could change the certbot-auto command to not use the full path, since that would be redundant.

:+1: in any case

dpoirier commented 7 years ago

I wasn't able to reproduce the error, sorry. It might only happen when a cert actually needs renewing or something like that.