Ebbe Hjorth wrote:
Hi,

I have a cronjob running once every night

/usr/local/bin/sa-update && /usr/local/etc/rc.d/sa-spamd restart

when i run it from a shell, everything is allright, but when i run i
through cron (root), then i get an email saying

error: gpg required but not found!

What i dont understand is why it works if i run it manually?


When runnig as cron, sa-update is unable to find the gpg programm.
You need to find out where is you gpg is (which gpg) and put it in the PATH
I suggest to create a small shell script, which runs per cron.
Something like that:

#!/bin/bash

#supposing "which gpg" delivers /usr/bin/gpg
export PATH=$PATH:/usr/bin
/usr/local/bin/sa-update
/usr/local/etc/rc.d/sa-spamd restart


I hope this helps

Regards
        Peter

Reply via email to