From 399ca88cb617836fdbf08fd0288200ec74541c3f Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 23 Mar 2010 15:34:21 +0000 Subject: Enable spamd package on 2.0 fix several paths with the move of files to the new directory also unlink the previous configuration file before linking anew one. --- config/spamd/spamd.inc | 4 ++++ config/spamd/spamd.xml | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'config') diff --git a/config/spamd/spamd.inc b/config/spamd/spamd.inc index c33e589c..e6b89051 100644 --- a/config/spamd/spamd.inc +++ b/config/spamd/spamd.inc @@ -153,6 +153,7 @@ function sync_package_spamd() { log_error("Restart cron"); mwexec("killall -HUP cron"); log_error("Setting up spamd.conf symlink"); + mwexec("rm -f /usr/local/etc/spamd/spamd.conf"); mwexec("ln -s /etc/spamd.conf /usr/local/etc/spamd/spamd.conf"); log_error("Stopping spamd"); mwexec("/usr/local/etc/rc.d/spamd.sh stop"); @@ -245,7 +246,10 @@ function custom_php_install_command() { system("touch /var/db/whitelist.txt"); system("touch /var/db/blacklist.txt"); sync_package_spamd(); + conf_mount_rw(); exec("/usr/sbin/pw usermod _spamd -g proxy -G _spamd,proxy"); + exec("/bin/cp /usr/local/etc/spamd/spamd.conf.sample /usr/local/etc/spamd/spamd.conf"); + conf_mount_ro(); } function custom_php_deinstall_command() { diff --git a/config/spamd/spamd.xml b/config/spamd/spamd.xml index 5bbc5d71..b03cd737 100644 --- a/config/spamd/spamd.xml +++ b/config/spamd/spamd.xml @@ -95,42 +95,42 @@ /usr/local/www/ 0755 - http://www.pfsense.com/packages/config/spamd_rules.php + http://www.pfsense.com/packages/config/spamd/spamd_rules.php /usr/local/pkg/ 0755 - http://www.pfsense.com/packages/config/spamd_whitelist.xml + http://www.pfsense.com/packages/config/spamd/spamd_whitelist.xml /usr/local/pkg/ 0755 - http://www.pfsense.com/packages/config/spamd_outlook.xml + http://www.pfsense.com/packages/config/spamd/spamd_outlook.xml /usr/local/pkg/ 0755 - http://www.pfsense.com/packages/config/spamd.inc + http://www.pfsense.com/packages/config/spamd/spamd.inc /usr/local/pkg/ 0755 - http://www.pfsense.com/packages/config/spamd_settings.xml + http://www.pfsense.com/packages/config/spamd/spamd_settings.xml /usr/local/www/ 0755 - http://www.pfsense.com/packages/config/spamd_db.php + http://www.pfsense.com/packages/config/spamd/spamd_db.php /usr/local/www/ 0755 - http://www.pfsense.com/packages/config/spamd_db_ext.php + http://www.pfsense.com/packages/config/spamd/spamd_db_ext.php /usr/local/bin/ 0755 - http://www.pfsense.com/packages/config/spamd_gather_stats.php + http://www.pfsense.com/packages/config/spamd/spamd_gather_stats.php