From owner-freebsd-questions@FreeBSD.ORG Tue Oct 25 18:45:07 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCC2016A423 for ; Tue, 25 Oct 2005 18:45:07 +0000 (GMT) (envelope-from rjhjr@cox.net) Received: from eastrmmtao04.cox.net (eastrmmtao04.cox.net [68.230.240.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D13543D55 for ; Tue, 25 Oct 2005 18:45:03 +0000 (GMT) (envelope-from rjhjr@cox.net) Received: from localhost ([68.230.186.138]) by eastrmmtao04.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20051025184409.LFLW23022.eastrmmtao04.cox.net@localhost> for ; Tue, 25 Oct 2005 14:44:09 -0400 Date: Tue, 25 Oct 2005 14:45:02 -0400 From: Bob Hall To: freebsd-questions@freebsd.org Message-ID: <20051025184502.GA83689@kongemord.krig.net> Mail-Followup-To: Bob Hall , freebsd-questions@freebsd.org References: <20051025131352.217826@bob> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051025131352.217826@bob> User-Agent: Mutt/1.4.2.1i Subject: Re: Crontab and GPG? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2005 18:45:07 -0000 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