aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-02-26 20:02:01 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-02-26 20:02:01 +0000
commit97780a68cb795af90e786f9ed9e3de441b149562 (patch)
treee01c64c7753664328a86fcaff070164555aa581a /packages
parent37226fe21ce40fd0c6bc756c42e584e34db2f26d (diff)
downloadpfsense-packages-97780a68cb795af90e786f9ed9e3de441b149562.tar.gz
pfsense-packages-97780a68cb795af90e786f9ed9e3de441b149562.tar.bz2
pfsense-packages-97780a68cb795af90e786f9ed9e3de441b149562.zip
More cleanups
Diffstat (limited to 'packages')
-rw-r--r--packages/spamd.xml4
-rw-r--r--packages/spamd_whitelist.xml23
2 files changed, 24 insertions, 3 deletions
diff --git a/packages/spamd.xml b/packages/spamd.xml
index f4a3a355..173c322c 100644
--- a/packages/spamd.xml
+++ b/packages/spamd.xml
@@ -122,8 +122,8 @@
}
fclose($fd);
$fd = fopen("/var/mail/whitelist.txt","w");
- if($config['installedpackages']['spamd-whitelist']['config'] != "")
- foreach($config['installedpackages']['spamd-whitelist']['config'] as $spamd) {
+ if($config['installedpackages']['spamdwhitelist']['config'] != "")
+ foreach($config['installedpackages']['spamdwhitelist']['config'] as $spamd) {
fwrite($fd, $spamd['ip'] . "\n");
}
fclose($fd);
diff --git a/packages/spamd_whitelist.xml b/packages/spamd_whitelist.xml
index 770b6f58..7fd25352 100644
--- a/packages/spamd_whitelist.xml
+++ b/packages/spamd_whitelist.xml
@@ -23,7 +23,7 @@
</tabs>
<!-- configpath gets expanded out automatically and config items will be
stored in that location -->
- <configpath>['installedpackages']['spamd-whitelist']['config']</configpath>
+ <configpath>['installedpackages']['spamdwhitelist']['config']</configpath>
<adddeleteeditpagefields>
<columnitem>
<fielddescr>Exempted IP</fielddescr>
@@ -50,4 +50,25 @@
<type>input</type>
</field>
</fields>
+ <custom_php_command_before_form>
+ function sync_package() {
+ global $config;
+ conf_mount_rw();
+ config_lock();
+ $fd = fopen("/var/mail/whitelist.txt","w");
+ if($config['installedpackages']['spamdwhitelist']['config'] != "")
+ foreach($config['installedpackages']['spamdwhitelist']['config'] as $spamd) {
+ fwrite($fd, $spamd['ip'] . "\n");
+ }
+ fclose($fd);
+ conf_mount_ro();
+ config_unlock();
+ }
+ </custom_php_command_before_form>
+ <custom_php_resync_config_command>
+ sync_package();
+ </custom_php_resync_config_command>
+ <custom_delete_php_command>
+ sync_package();
+ </custom_delete_php_command>
</packagegui>