#!/bin/sh
sys=`uname`
if [ "$sys" = "Linux" ];then
. ${HOME}/.bash_profile
else
. ${HOME}/.profile
fi
dateStr=`date +"%Y%m%d%H%M"`
fsize=`du -ks /opt/tmailer/log/freshclam.log|awk '{print $1}'`
if [ $fsize -gt 1024 ];then
cp /opt/tmailer/log/freshclam.log /opt/tmailer/log/freshclam.$dateStr > /dev/null 2>&1 &
cat /dev/null > /opt/tmailer/log/freshclam.log
fi
chown -Rf tmailer:tmailer /opt/tmailer/log >/dev/null 2>&1 &
阅读(3503) | 评论(0) | 转发(0) |