[pkg-dspam-commits] r82 - trunk/debian
Matthijs Mohlmann
active2-guest at costa.debian.org
Wed Mar 15 20:46:50 UTC 2006
Author: active2-guest
Date: Wed Mar 15 20:46:50 2006
New Revision: 82
Added:
trunk/debian/libdspam7-drv-mysql.cron.daily
Modified:
trunk/debian/changelog
trunk/debian/dspam.cron.daily
Log:
* Modified dspam cron script a bit to purge entries in db4 backend too.
* Added mysql cron.daily script.
Modified: trunk/debian/changelog
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Wed Mar 15 20:46:50 2006
@@ -4,8 +4,10 @@
* Recommend clamav-daemon, instead of clamav. (Closes: #356899)
* Don't do apache configuration for dspam-webfrontend. (Closes: #356835)
* Swap totals in the User Statistics web frontend. (Closes: #357094)
+ * Added cron.daily purge script for mysql. (Closes: #357100)
+ * Modified dspam crontab to also purge entries from a db4 database.
- -- Debian DSPAM Maintainers <pkg-dspam-misc at lists.alioth.debian.org> Wed, 15 Mar 2006 19:13:47 +0100
+ -- Debian DSPAM Maintainers <pkg-dspam-misc at lists.alioth.debian.org> Wed, 15 Mar 2006 21:45:12 +0100
dspam (3.6.4-2) unstable; urgency=low
Modified: trunk/debian/dspam.cron.daily
==============================================================================
--- trunk/debian/dspam.cron.daily (original)
+++ trunk/debian/dspam.cron.daily Wed Mar 15 20:46:50 2006
@@ -1,10 +1,10 @@
#!/bin/sh
#
-# Clean up the hash databases
+# Clean up the hash / db4 databases
DSPAMCONF=/etc/dspam/dspam.conf
-if grep -q "^StorageDriver.*hash_drv.so" $DSPAMCONF; then
+if egrep -q "^StorageDriver.*(hash|db4)_drv.so" $DSPAMCONF; then
if [ -x /usr/bin/dspam_clean ]; then
/usr/bin/dspam_clean -s -p
fi
Added: trunk/debian/libdspam7-drv-mysql.cron.daily
==============================================================================
--- (empty file)
+++ trunk/debian/libdspam7-drv-mysql.cron.daily Wed Mar 15 20:46:50 2006
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# Clean up the mysql databases
+
+DSPAMCONF=/etc/dspam/dspam.conf
+MYSQLCONF=/etc/dspam/dspam.d/mysql.conf
+PURGE=/usr/share/doc/libdspam7-drv-mysql/purge-4.1.sql
+
+if grep -q "^StorageDriver.*mysql_drv.so" $DSPAMCONF; then
+ if [ -x /usr/bin/mysql ]; then
+ MYSQL_USER="`grep "^MySQLUser" $MYSQLCONF | awk '{print $2}'`"
+ MYSQL_PASS="`grep "^MySQLPass" $MYSQLCONF | awk '{print $2}'`"
+ MYSQL_DB="`grep "^MySQLDb" $MYSQLCONF | awk '{print $2}'`"
+ /usr/bin/mysql --user=$MYSQL_USER --password=$MYSQL_PASS $MYSQL_DB < $PURGE
+ fi
+fi
+
+exit 0
+
More information about the Pkg-dspam-commits
mailing list