# SAGATOR cron script

# Set locale to "C".
LANG=C

# update trafgrapher graphs
*/5 * * * * vscan [ -x /usr/bin/tgc ] && /usr/bin/python3 /usr/local/share/sagator/stats.py trafgrapher /var/www/html/sagator/tg > /var/log/sagator/trafgrapher.log 2>&1

# update rrd graphs
*/5 * * * * vscan [ -x /usr/bin/rrdtool ] && /usr/bin/python3 /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}/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 /usr/local/share/sagator/dbcleanup.py

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