From 758cf47f9d3494daeb4c1fab6ad67b30216063a8 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 20 Mar 2006 04:26:05 +0000 Subject: Add spamd-setup to crontab and execute every 2 hours --- packages/spamd.inc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'packages') diff --git a/packages/spamd.inc b/packages/spamd.inc index 6cfd8492..f31cf053 100644 --- a/packages/spamd.inc +++ b/packages/spamd.inc @@ -130,6 +130,9 @@ function sync_package_spamd() { ); conf_mount_ro(); config_unlock(); + $cronjob = "*/120 * * * * root /usr/bin/nice -n20 /usr/local/sbin/spamd-setup"; + add_text_to_file("/etc/crontab", $cronjob); + mwexec("killall -HUP cron"); mwexec("ln -s /etc/spamd.conf /usr/local/etc/spamd.conf"); mwexec("/usr/local/etc/rc.d/spamd.sh stop"); mwexec("/usr/local/etc/rc.d/spamd.sh start"); -- cgit v1.2.3