# SAGATOR cron script

# Set locale to "C".
LANG=C

# update rrd graphs
*/5 * * * * vscan [ -x /usr/bin/rrdtool ] && /usr/bin/python /usr/local/share/sagator/stats.py rrdtool /var/www/html/sagator > /var/log/sagator/rrd.log 2>&1

# update mrtg graphs
#*/5 * * * * vscan [ -x /usr/bin/mrtg ] && /usr/bin/mrtg --lock-file "%{CHROOT}/var/log/sagator" /etc/mrtg/sagator.cfg > /var/log/sagator/mrtg.log 2>&1

# clean old quarantine after 32 days (tmpwatch)
22 4 * * * vscan [ -x /usr/sbin/tmpwatch ] && /usr/sbin/tmpwatch --mtime 768 "%{CHROOT}/tmp/quarantine"

# clean old quarantine after 32 days (tmpreaper)
#22 4 * * * vscan [ -x /usr/sbin/tmpreaper ] && /usr/sbin/tmpreaper --mtime 767 "%{CHROOT}/tmp/quarantine"

# database cleanup (autowhitelist, remove expired data, ...)
#*/5 * * * * vscan /usr/local/share/sagator/dbcleanup.py

# daily reports for users
#0 5 * * * vscan /usr/local/share/sagator/reporter.py
