aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-03-09 01:33:47 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2012-03-09 01:33:47 +0000
commit42915d85ecd05b97676d2fb72410c1178c425af9 (patch)
treeb613ef57bc14dc2d4e643a297de4a223a244856f
parentc06b533b4abf44055fe271afec93c47bd5da1d43 (diff)
downloadverteco-42915d85ecd05b97676d2fb72410c1178c425af9.tar.gz
Fix ftpupload
-rwxr-xr-xsrc/ftpupload6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ftpupload b/src/ftpupload
index 7d46f46..05ae60e 100755
--- a/src/ftpupload
+++ b/src/ftpupload
@@ -10,7 +10,11 @@ SERVER=`/usr/bin/ftphelper --server`
REMOTEDIRECTORY=`/usr/bin/ftphelper --directory`
# local file to be uploaded
-FILE="/var/modbuslog/"`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='1 days ago'`"_00_00_00.log"
+FILE=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='1 days ago'`"_00_00_00.log"
+
+# 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/
# login to remote server and upload
ftp -n -i $SERVER <<EOF