X-Git-Url: http://git.pjr.cc/?p=wyse_ntpd.git;a=blobdiff_plain;f=src%2Fbuildroot-2013.05%2Fcustom%2Ffilesystem%2Fopt%2Fstats_daemon.sh;fp=src%2Fbuildroot-2013.05%2Fcustom%2Ffilesystem%2Fopt%2Fstats_daemon.sh;h=a5b9e1eea2f39e5e9a44d7506e232982acbbc1ce;hp=ab35d5727f98113d937bfa685864a3d6dfc51630;hb=cc638338500245c3d5b4a6beb47eccfd50548949;hpb=ce8ac1166fe17738d277671adb6deeb4460d3091 diff --git a/src/buildroot-2013.05/custom/filesystem/opt/stats_daemon.sh b/src/buildroot-2013.05/custom/filesystem/opt/stats_daemon.sh index ab35d57..a5b9e1e 100755 --- a/src/buildroot-2013.05/custom/filesystem/opt/stats_daemon.sh +++ b/src/buildroot-2013.05/custom/filesystem/opt/stats_daemon.sh @@ -1,8 +1,13 @@ #!/bin/sh + +cldate=`date '+%s'` while(true) do date '+%s' >> /var/www/data/ntp.log.$cldate ntpq -c lpe -n |grep "127.127.20" >> /var/www/data/ntp.log.$cldate + + find /var/www/data/stats -mtime +2 -type f -exec rm {} \; + sleep 30 done