aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-03-12 00:36:13 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2012-03-12 00:36:13 +0000
commit577e2f84f58a2f46839e82b096cf9493d2ef035b (patch)
treeae12cffdb34f474bd2b0b5a6deb2c027b4c51136
parent41cbae4f42418572fd5a12caa162d19da14e146b (diff)
downloadverteco-577e2f84f58a2f46839e82b096cf9493d2ef035b.tar.gz
ftphelper: Fix off by one errorv1.2
Date in filename represents file generation time, not date of logfile. Throwback to fieldcommander sqlite to logfile days.
-rwxr-xr-xsrc/ftpupload14
1 files changed, 7 insertions, 7 deletions
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/