diff options
author | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-02-20 11:25:26 +0000 |
---|---|---|
committer | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-02-20 11:43:34 +0000 |
commit | a6a6f9c5a4ddc0295bb12fd93ed0ba23ed696122 (patch) | |
tree | 83a6d5526dc5998fa02a6958a6d18367e8fd9e0a /src | |
parent | a5b894ac9c583066da6fbd144b85d24f0ed58568 (diff) | |
download | verteco-a6a6f9c5a4ddc0295bb12fd93ed0ba23ed696122.tar.gz |
Prune archive after 3 months
Diffstat (limited to '')
-rwxr-xr-x | src/ftpupload | 5 |
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 |