Open vnv099 opened 4 years ago
What error message did it give? I wouldn't be surprised if it couldn't find curl or openssl. Note that you can add a PATH=... line to your crontab, so that getssl doesn't need to be wrapped in another script.
I think the relevant difference that makes it work with your script isn't the PATH, but that you've explicitly specified the working directory using -w /etc/getssl
.
I just ran into a very similar issue while moving my getssl instance from cron to a systemd timer.
/root/.getssl/example.com
WorkingDirectory=/root/.getssl/
in the .service file, it apparently expected to find them at /.getssl/example.com
. Without hand-feeding getssl -w /root/.getssl
it would just return successfully after having done nothing at all. Asking it to check only one specific domain finally allowed me to pinpoint where it was looking.
I tried getssl script on 10.4-RELEASE-p13 FreeBSD. Just adding to crontab string like from readme -
23 5 * * * /root/scripts/getssl -u -a -q
doesn't work, but from command line all working perfectly. It is something with PATH, that uses cron, because to solve this issue I had to make own script, set another PATH there and run it from crontab. Script is: