aboutsummaryrefslogtreecommitdiffstats
path: root/packages/havp.inc
diff options
context:
space:
mode:
authorRajkumar S <raj@pfsense.org>2006-06-08 13:41:24 +0000
committerRajkumar S <raj@pfsense.org>2006-06-08 13:41:24 +0000
commitf446aa67ead8d0bdcb0119376f137da250f77977 (patch)
tree0896db728f085b5bbd6f4831764d539d0d8db7de /packages/havp.inc
parentf9c1940c1136b33b52124a99d384717dae9eed20 (diff)
downloadpfsense-packages-f446aa67ead8d0bdcb0119376f137da250f77977.tar.gz
pfsense-packages-f446aa67ead8d0bdcb0119376f137da250f77977.tar.bz2
pfsense-packages-f446aa67ead8d0bdcb0119376f137da250f77977.zip
Added more options, default values are more sane. Works okay with current ClamAV packages
Diffstat (limited to 'packages/havp.inc')
-rw-r--r--packages/havp.inc20
1 files changed, 19 insertions, 1 deletions
diff --git a/packages/havp.inc b/packages/havp.inc
index dd0592a0..e0169f51 100644
--- a/packages/havp.inc
+++ b/packages/havp.inc
@@ -1,4 +1,9 @@
<?php
+require_once('globals.inc');
+require_once('config.inc');
+require_once('service-utils.inc');
+require_once('pkg-utils.inc');
+require_once('pfsense-utils.inc');
/*
havp.inc
part of the HAVP package for pfSense
@@ -52,8 +57,15 @@ function sync_package_havp() {
if ($tmp['servernumber'] != "") fwrite($fd,"SERVERNUMBER " . $tmp['servernumber'] . "\n");
if ($tmp['maxservers'] != "") fwrite($fd,"MAXSERVERS " . $tmp['maxservers'] . "\n");
if ($tmp['port'] != "") fwrite($fd,"PORT " . $tmp['port'] . "\n");
- if ($tmp['bind_address'] != "") fwrite($fd,"BIND_ADDRESS " . $tmp['bind_address'] . " \n");
+ if ($tmp['bind_address'] != ""){
+ fwrite($fd,"BIND_ADDRESS " . $tmp['bind_address'] . " \n");
+ }else {
+ fwrite($fd,"BIND_ADDRESS " . $config['interfaces']['lan']['ipaddr'] . " \n");
+ }
if ($tmp['source_address'] != "") fwrite($fd,"SOURCE_ADDRESS " . $tmp['source_address'] . " \n");
+ if ($tmp['dbreload'] != "") fwrite($fd,"DBRELOAD" . $tmp['dbreload'] . " \n");
+ if ($tmp['parentproxy'] != "") fwrite($fd,"PARENTPROXY" . $tmp['parentproxy'] . " \n");
+ if ($tmp['parentport'] != "") fwrite($fd,"PARENTPORT" . $tmp['parentport'] . " \n");
if ($tmp['transparent'] == "on"){
fwrite($fd,"TRANSPARENT true\n");
@@ -68,6 +80,12 @@ function sync_package_havp() {
else {
fwrite($fd,"RANGE false\n");
}
+ if ($tmp['log_oks'] == "on"){
+ fwrite($fd,"LOG_OKS true\n");
+ }
+ else {
+ fwrite($fd,"LOG_OKS false\n");
+ }
}
}
fclose($fd);