From owner-freebsd-questions@FreeBSD.ORG Tue Jul 26 09:27:43 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 C6F6A16A41F for ; Tue, 26 Jul 2005 09:27:43 +0000 (GMT) (envelope-from gbentley@uk2.net) Received: from webmailsmtp1.uk2net.com (mailout.uk2.net [83.170.69.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F97043D45 for ; Tue, 26 Jul 2005 09:27:43 +0000 (GMT) (envelope-from gbentley@uk2.net) Received: from [10.0.1.51] (helo=mailnew-1.uk2.net) by webmailsmtp1.uk2net.com with smtp (Exim 4.43) id 1DxLix-0007zB-Kw for freebsd-questions@freebsd.org; Tue, 26 Jul 2005 10:27:43 +0100 Received: from 81.174.174.115 (SquirrelMail authenticated user gbentley) by maxproxy1.uk2net.com with HTTP; Tue, 26 Jul 2005 10:27:43 +0100 (BST) Message-ID: <50079.81.174.174.115.1122370063.squirrel@maxproxy1.uk2net.com> In-Reply-To: <20050726020239.195DD16A428@hub.freebsd.org> References: <20050726020239.195DD16A428@hub.freebsd.org> Date: Tue, 26 Jul 2005 10:27:43 +0100 (BST) From: "Graham Bentley" To: freebsd-questions@freebsd.org User-Agent: SquirrelMail/1.4.1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal Subject: Where to put scripts ? 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, 26 Jul 2005 09:27:43 -0000 Hi All, I have a short script for Flexbackup ; #!/bin/sh # Backup using Flexbackup /bin/rm -f /data/IT/Backup_Log/data* /usr/local/bin/flexbackup -newtape /usr/local/bin/flexbackup -dir /data /usr/bin/mt -f /dev/sa0 rewind /usr/bin/mt -f /dev/sa0 offline I put this in /usr/bin/ and made exec In crontab I put ; # Flexbackup Nightly Backup Job 0 2 * * 1-5 root /usr/bin/backup If I run the script manually at the prompt it works perfectly and a new log is written to /data/IT/Backup_Log/ - Great ! (From flexbackup.conf $logdir = '/data/IT/Backup_Log'; # directory for log files) If cron runs it, the old log is rm'ed but no new one is written ??? Is it something to do with paths / perms ? Any help ? -= Thanks =-