From owner-freebsd-questions Thu Feb 8 0:44:16 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ozlerplastik.com (unknown [212.253.41.123]) by hub.freebsd.org (Postfix) with ESMTP id 1986837B503 for ; Thu, 8 Feb 2001 00:43:54 -0800 (PST) Received: (from root@localhost) by ozlerplastik.com (8.11.1/8.11.1) id f188hmi12243 for questions@freebsd.org.AVP; Thu, 8 Feb 2001 10:43:48 +0200 (EET) (envelope-from ertank@ozlerplastik.com) Received: from ozlerplastik.com (ertan [192.168.0.20]) by ozlerplastik.com (8.11.1/8.11.1) with ESMTP id f188hjA12237 for ; Thu, 8 Feb 2001 10:43:48 +0200 (EET) (envelope-from ertank@ozlerplastik.com) Message-ID: <3A825B2F.B7A1FA80@ozlerplastik.com> Date: Thu, 08 Feb 2001 10:39:11 +0200 From: Ertan Kucukoglu Organization: =?iso-8859-9?Q?=D6zler?= Plastik San. ve Tic. A.S. X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: tr,en MIME-Version: 1.0 To: questions@freebsd.org Subject: script problem (off topic) X-Priority: 4 (Low) Content-Type: text/plain; charset=iso-8859-9 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello, I have a script to update my virus definitions every night. I use unzip program it it. But, I always get errors indicating that unzip can not find the required file. A part of original script output is below: ------------------------------- Any cumulative update? There is no cumulative update. Get the daily update. 7339 bytes transferred in 3.5 seconds (2.04 kBps) unzip: not found Killed AvpBSDDaemon(65306) Killed AvpBSDDaemon(65307) ------------------------------- And, here is my running script: ------------------------------- #! /bin/sh FTP='ftp://ftp.avp.ru/updates_zip/' TEST_FILE='avp'`date +'%y%m'`'.zip' DOWNLOAD_FILE='daily.zip' AVPDIR=/usr/local/share/AVP # Check if we already have this month's update. if ! test -f $AVPDIR/avp`date +'%y%m'`.avc; then # No we do not. Check if there is on ftp site. echo 'Any cumulative update?' if fetch -s $FTP$TEST_FILE; then echo 'There is new cumulative update.' cd /tmp if fetch $FTP$TEST_FILE; then cd $AVPDIR mkdir `date +'%y%m%d'` mv avp* *.avc `date +'%y%m%d'` # Move back the avpkeeper directory. mv `date +'%y%m'`/avpkeeper . cd /tmp unzip -o $TEST_FILE -d $AVPDIR # Restart AvpBSDDaemon to reflect changes. cd $AVPDIR ./AvpBSDDaemon -ka ./AvpBSDDaemon # All updates are done. Exit successfully. exit 0 else echo 'ERROR: Can not download file '$TEST_FILE exit 1 fi else echo 'There is no cumulative update.' fi fi echo 'Get the daily update.' cd $AVPDIR if fetch $FTP$DOWNLOAD_FILE; then cd $AVPDIR unzip -o $DOWNLOAD_FILE # Restart AvpBSDDaemon to reflect changes. ./AvpBSDDaemon -ka ./AvpBSDDaemon # Daily update is done. Exit successfully. exit 0 fi echo 'ERROR: Can not download file '$DOWNLOAD_FILE exit 1 ------------------------------- I can not figure out what is the problem. Can someone give me a hand? Best Regards, -- Ertan Kucukoglu ertank@ozlerplastik.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message