aboutsummaryrefslogtreecommitdiffstats
path: root/src/ftpupload
diff options
context:
space:
mode:
Diffstat (limited to 'src/ftpupload')
-rwxr-xr-xsrc/ftpupload5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ftpupload b/src/ftpupload
index 2483764..7d46f46 100755
--- a/src/ftpupload
+++ b/src/ftpupload
@@ -20,4 +20,9 @@ mput $FILE
bye
EOF
+# move file to archive
mv $FILE /var/modbuslog/archive/
+
+# remove files after 3 months
+CLEANUP="/var/modbus/archive/"`/usr/bin/ftphelper --mac`"_"`date +%Y_%m --date='4 months ago'`"*.log"
+rm $CLEANUP