aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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