#!/bin/sh
# Copyright (c) 2000-2013 Synology Inc. All rights reserved.
file="/usr/syno/etc/disk_health_record_time"
if [ -e $file ]; then
m1=`cat $file | awk '{print $2}'`
y1=`cat $file | awk '{print $5}'`
else
m1=""
y1=""
fi
m2=`date | awk '{print $2}'`
y2=`date | awk '{print $6}'`
if [ "$m1" != "$m2" -o "$y1" != "$y2" ]; then
echo "`/bin/date -u`: execute /usr/syno/bin/syno_disk_health_record ..."
/usr/syno/bin/syno_disk_health_record
fi