# SAGATOR cron script

# Set locale to "C".
LANG=C

# update trafgrapher graphs
*/5 * * * * vscan [ -x /usr/bin/tgc ] && /usr/bin/%PYTHON% %PROGDIR%/stats.py trafgrapher %WEBDIR%/tg > /var/log/sagator/trafgrapher.log 2>&1

# update rrd graphs
*/5 * * * * vscan [ -x /usr/bin/rrdtool ] && /usr/bin/%PYTHON% %PROGDIR%/stats.py rrdtool %WEBDIR% > /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}/var/spool/sagator/quarantine"

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

# database cleanup (autowhitelist, remove expired data, ...)
#*/5 * * * * vscan %PROGDIR%/dbcleanup.py

# daily reports for users
#0 5 * * * vscan %PROGDIR%/reporter.py
