File: //etc.defaults/init/pkg-synoreport.conf
cgroup cpuacct "pkgctl-StorageAnalyzer"
cgroup memory "pkgctl-StorageAnalyzer"
description "synoreport"
author "Web Infrastructure Team"
start on syno.share.ready
task
console log
script
SYNOREPORT_CMD=/usr/syno/synoreport/synoreport
GET_CMD=/usr/syno/bin/get_section_key_value
SYNOREPORT_CONF=/usr/syno/etc/synoreport.conf
clean_data()
{
LOC=`$GET_CMD $SYNOREPORT_CONF global report_location`
if [ "x$LOC" != "x" ]; then
echo "`/bin/date -u`: Before cleanning temp files and generating global data."
$SYNOREPORT_CMD -clean >/dev/null 2>&1
$SYNOREPORT_CMD -data global >/dev/null 2>&1
echo "`/bin/date -u`: After cleanning temp files and generating global data."
fi
}
if [ -e "$SYNOREPORT_CMD" ]; then
clean_data
fi
end script