#!/bin/sh

plat=`/bin/grep unique /etc.defaults/synoinfo.conf | cut -d_ -f 2`
case "$plat" in
	88f6282)
		platform="88f6281"
	;;
	*)
		platform="$plat"
	;;
esac

for file in webalizer rotatelogs;
do
	if [ ! -x $SYNOPKG_PKGDEST/bin/$platform/$file ]; then
		echo "Bad package. The $file for $platform is missing." > $SYNOPKG_TEMP_LOGFILE
		exit 1;
	fi

	cp $SYNOPKG_PKGDEST/bin/$platform/$file $SYNOPKG_PKGDEST/bin/
done

exit 0

