#! /bin/sh

# Run pkgsync, logging to /var/log/pkgsync.log. If there is an error, we cat
# the entire file to stdout, so cron will complain to the admin. We don't
# rotate pkgsync.log (yet?) but it will be overwritten every night.

export PATH=/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin

if [ -x /usr/sbin/pkgsync ]; then
	( pkgsync >/var/log/pkgsync.log 2>&1 ) || cat /var/log/pkgsync.log
fi
