aboutsummaryrefslogtreecommitdiffstats
path: root/config/havp
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-09-12 22:09:19 +0200
committerdoktornotor <notordoktor@gmail.com>2015-09-12 22:09:19 +0200
commit1039ba4bdf562783f19ac3ed551011f5cfe7200a (patch)
treed343889403678aad8022d75dc8884861bb3d6bb1 /config/havp
parent5a6732cdab3ed5f42bf3ecb470f99ca59488e6e4 (diff)
downloadpfsense-packages-1039ba4bdf562783f19ac3ed551011f5cfe7200a.tar.gz
pfsense-packages-1039ba4bdf562783f19ac3ed551011f5cfe7200a.tar.bz2
pfsense-packages-1039ba4bdf562783f19ac3ed551011f5cfe7200a.zip
havp - fix template paths
Diffstat (limited to 'config/havp')
-rw-r--r--config/havp/havp.inc12
1 files changed, 7 insertions, 5 deletions
diff --git a/config/havp/havp.inc b/config/havp/havp.inc
index 38412f31..30b06d03 100644
--- a/config/havp/havp.inc
+++ b/config/havp/havp.inc
@@ -87,9 +87,13 @@ define('HVDEF_PID_FILE', '/var/run/havp.pid');
$pf_version=substr(trim(file_get_contents("/etc/version")), 0, 3);
if ($pf_version == "2.1" || $pf_version == "2.2") {
- define("HVDEF_WORK_DIR", "/usr/pbi/havp-" . php_uname("m") . "/local/etc");
+ define("HVDEF_WORK_DIR", "/usr/pbi/havp-" . php_uname("m") . "/local/etc");
+ define('HVDEF_TEMPLATES', "/usr/pbi/havp-" . php_uname("m") . "/local/share/examples/havp/templates");
+ define('HVDEF_TEMPLATES_EX', HVDEF_TEMPLATES . '_ex');
} else {
- define("HVDEF_WORK_DIR", "/usr/local/etc/havp");
+ define("HVDEF_WORK_DIR", "/usr/local/etc/havp");
+ define('HVDEF_TEMPLATES', '/usr/local/share/examples/havp/templates');
+ define('HVDEF_TEMPLATES_EX', HVDEF_TEMPLATES . '_ex');
}
define('HVDEF_LOG_DIR', '/var/log/havp');
@@ -97,8 +101,6 @@ define('HVDEF_TEMP_DIR', '/var/tmp');
define('HVDEF_HAVPTEMP_DIR', HVDEF_TEMP_DIR . '/havp');
define('HVDEF_RAMTEMP_DIR', HVDEF_TEMP_DIR . '/havpRAM');
define('HVDEF_SCANTEMPFILE', '/havp-XXXXXX');
-define('HVDEF_TEMPLATES', '/usr/local/share/examples/havp/templates');
-define('HVDEF_TEMPLATES_EX', HVDEF_TEMPLATES . '_ex');
define('HVDEF_FILTER_RULES', '/tmp/rules.havp');
define('HVDEF_HAVP_CONFIG', HVDEF_WORK_DIR . '/havp.config');
define('HVDEF_HAVP_XMLCONF', HVDEF_WORK_DIR . '/havp_conf.xml');
@@ -628,7 +630,7 @@ function havp_convert_pfxml_xml() {
$havp_config[F_PROXYBINDIFACE] = 'localhost';
/* Language template files path */
$lng = $havp_config[F_LANGUAGE] ? $havp_config[F_LANGUAGE] : "en";
- $havp_config[F_TEMPLATEPATH] = (file_exists(HVDEF_TEMPLATES_EX . "/$lng") ? HVDEF_TEMPLATES_EX : HVDEF_TEMPLATES );
+ $havp_config[F_TEMPLATEPATH] = (file_exists(HVDEF_TEMPLATES . "/$lng") ? HVDEF_TEMPLATES : HVDEF_TEMPLATES_EX );
$havp_config[F_TEMPLATEPATH] .= "/$lng";
/* AV settings */
$pf_avset_conf = $config['installedpackages'][HVFORM_AVSET]['config'][0];