From ef40490b47e4ffa64ffae41b43ee5096d1460ece Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Tue, 13 Mar 2012 00:59:48 +0000 Subject: ftpupload: use fully qualified paths cron requires them --- src/ftpupload | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/ftpupload') diff --git a/src/ftpupload b/src/ftpupload index 09dfe4d..01cbdb2 100755 --- a/src/ftpupload +++ b/src/ftpupload @@ -20,15 +20,18 @@ FIVEDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='4 days ago'`"_00 SIXDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='5 days ago'`"_00_00_00.log" SEVENDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='6 days ago'`"_00_00_00.log" +# enter modbuslog directory +cd /var/modbuslog/ + # move file to archive -mv $CURRENTLOG /var/modbuslog/archive/ +/bin/mv $CURRENTLOG /var/modbuslog/archive/ # mput is dumb, and if we don't cd to the directory, # it will try to save file to /var/modbuslog/MAC.....log on ftp remote cd /var/modbuslog/archive/ # login to remote server and upload -ftp -n -v -i $SERVER <