From owner-freebsd-questions@FreeBSD.ORG Tue Jul 26 09:41:42 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 5132D16A41F for ; Tue, 26 Jul 2005 09:41:42 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from server.absolute-media.de (server.absolute-media.de [213.239.231.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id D353643D45 for ; Tue, 26 Jul 2005 09:41:41 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from localhost (unknown [127.0.0.1]) by server.absolute-media.de (Postfix) with ESMTP id 92E298C016; Tue, 26 Jul 2005 11:41:40 +0200 (CEST) Received: from server.absolute-media.de ([127.0.0.1]) by localhost (server [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03641-10; Tue, 26 Jul 2005 11:41:35 +0200 (CEST) Received: from firewall.demig (p5083905E.dip0.t-ipconnect.de [80.131.144.94]) by server.absolute-media.de (Postfix) with ESMTP id BF3C68C352; Tue, 26 Jul 2005 11:41:35 +0200 (CEST) Received: from ws-ew-3 (ws-ew-3.w2kdemig [192.168.1.72]) by firewall.demig (8.13.4/8.13.1) with SMTP id j6Q9ed5B003960; Tue, 26 Jul 2005 11:40:39 +0200 (CEST) (envelope-from NKoch@demig.de) From: "Norbert Koch" To: "Graham Bentley" , Date: Tue, 26 Jul 2005 11:40:38 +0200 Message-ID: <000101c591c6$14846420$4801a8c0@ws-ew-3.W2KDEMIG> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 In-Reply-To: <50079.81.174.174.115.1122370063.squirrel@maxproxy1.uk2net.com> X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at absolute-media.de Cc: Subject: RE: 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:41:42 -0000 > 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 ? Look into crontab(5). There is a section about the environment settings. My idea is that flexbackup calls some program w/o full path. Is flexbackup a shell/perl/* script? Norbert