HEX
Server: Apache/2.2.34 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141
System: Linux Kou-Etsu-Dou 4.4.59+ #25556 SMP PREEMPT Thu Mar 4 18:03:46 CST 2021 x86_64
User: hosam (1026)
PHP: 7.2.29
Disabled: NONE
Upload Files
File: //etc/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