Date: Tue, 25 Oct 2005 14:45:02 -0400 From: Bob Hall <rjhjr@cox.net> To: freebsd-questions@freebsd.org Subject: Re: Crontab and GPG? Message-ID: <20051025184502.GA83689@kongemord.krig.net> In-Reply-To: <20051025131352.217826@bob> References: <20051025131352.217826@bob>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 25, 2005 at 01:13:52PM -0500, Robert Wall wrote: > Hello! I'm attempting to run GPG from cron, and it's not working. I can run the script from the command line, and all works perfectly. When I try to run it from cron, however, it doesn't work. The crontab calls this script, called "pgpdecrypt" with the following crontab line: > > */1 * * * * root /bin/bash /etc/pgpdecrypt > > The /bin/bash wasn't originally there; I added it to make sure that the script was using the correct shell. Still no luck. Here's the script that it calls: > > echo >> /etc/pgpdecrypt.logger "PGP Decrypter Starting" Take the "/bin/bash" out of your crontab. Put #!/bin/bash at the beginning of your script. I just looked at your script quickly, but it looks like it should run in sh. For portability, you can use #!/bin/sh Bob Hall
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051025184502.GA83689>