diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-01-28 22:16:28 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-01-28 22:16:28 +0000 |
commit | ced114fa6168eee63e7055f898453d311cc67a50 (patch) | |
tree | 2ba41334db9475717de3b091cdfa50529432d752 /packages | |
parent | 85daaffffbc13c2b1cc52776e7fcef506f0eddba (diff) | |
download | pfsense-packages-ced114fa6168eee63e7055f898453d311cc67a50.tar.gz pfsense-packages-ced114fa6168eee63e7055f898453d311cc67a50.tar.bz2 pfsense-packages-ced114fa6168eee63e7055f898453d311cc67a50.zip |
Take slighty different approach to grab deeply nested array variables
Diffstat (limited to 'packages')
-rw-r--r-- | packages/spamd.inc | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/packages/spamd.inc b/packages/spamd.inc index a324a505..a57e1bb0 100644 --- a/packages/spamd.inc +++ b/packages/spamd.inc @@ -45,21 +45,27 @@ function sync_package_spamd() { $stuttersecs = ""; $delaysecs = ""; $pkg = get_pkg_id("spamd"); - $pkg_i = $config['installedpackages']['spamdsettings']['config']; - if($pkg_i['passtime'] <> "") - $passtime = $pkg_i['passtime']; - if($pkg_i['identifier'] <> "") - $identifier = " -n \"" . $pkg_i['identifier'] . "\""; - if(isset($pkg_i['greylisting']) <> "") - $greylisting = $pkg_i['greylisting']; - if($pkg_i['maxblack'] <> "") - $maxblack = " -B " . $pkg_i['maxblack']; - if($pkg_i['maxcon'] <> "") - $maxcon = " -c " . $pkg_i['maxcon']; - if($pkg_i['stuttersecs'] <> "") - $stuttersecs = " -S " . $pkg_i['stuttersecs']; - if($pkg_i['delaysecs'] <> "") - $delaysecs = " -s " . $pkg_i['delaysecs']; + + if($config['installedpackages']['spamdsettings']['config']) { + foreach($config['installedpackages']['spamdsettings']['config'] as $ss) { + if($ss['nextmta'] <> "") + $nextmta = $ss['nextmta']; + if($ss['passtime'] <> "") + $passtime = $ss['passtime']; + if($ss['identifier'] <> "") + $identifier = " -n \"" . $ss['identifier'] . "\""; + if(isset($ss['greylisting']) <> "") + $greylisting = $ss['greylisting']; + if($ss['maxblack'] <> "") + $maxblack = " -B " . $ss['maxblack']; + if($ss['maxcon'] <> "") + $maxcon = " -c " . $ss['maxcon']; + if($ss['stuttersecs'] <> "") + $stuttersecs = " -S " . $ss['stuttersecs']; + if($ss['delaysecs'] <> "") + $delaysecs = " -s " . $ss['delaysecs']; + } + } $start = "/usr/local/sbin/spamd-setup &\n" . "/sbin/pflogd &\n" . "/sbin/mount_fdescfs fdescfs /dev/fd\n" . |