From 577e2f84f58a2f46839e82b096cf9493d2ef035b Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Mon, 12 Mar 2012 00:36:13 +0000 Subject: ftphelper: Fix off by one error Date in filename represents file generation time, not date of logfile. Throwback to fieldcommander sqlite to logfile days. --- src/ftpupload | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/ftpupload b/src/ftpupload index 54385be..09dfe4d 100755 --- a/src/ftpupload +++ b/src/ftpupload @@ -10,15 +10,15 @@ SERVER=`/usr/bin/ftphelper --server` REMOTEDIRECTORY=`/usr/bin/ftphelper --directory` # current file to be uploaded -CURRENTLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='1 days ago'`"_00_00_00.log" +CURRENTLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='0 days ago'`"_00_00_00.log" # upload previous 6 days for redundancy -TWODAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='2 days ago'`"_00_00_00.log" -THREEDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='3 days ago'`"_00_00_00.log" -FOURDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='4 days ago'`"_00_00_00.log" -FIVEDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='5 days ago'`"_00_00_00.log" -SIXDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='6 days ago'`"_00_00_00.log" -SEVENDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='7 days ago'`"_00_00_00.log" +TWODAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='1 days ago'`"_00_00_00.log" +THREEDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='2 days ago'`"_00_00_00.log" +FOURDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='3 days ago'`"_00_00_00.log" +FIVEDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='4 days ago'`"_00_00_00.log" +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" # move file to archive mv $CURRENTLOG /var/modbuslog/archive/ -- cgit v1.2.3