From 173f48bf08482c9b6c919f7275e6f0cc2b402944 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 28 Apr 2015 09:12:37 -0300 Subject: Sanitize imspector version, add port_category, run_depends and fix pbi checking --- config/imspector/imspector.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'config/imspector') diff --git a/config/imspector/imspector.inc b/config/imspector/imspector.inc index 89fbda2b..7853e627 100644 --- a/config/imspector/imspector.inc +++ b/config/imspector/imspector.inc @@ -35,8 +35,12 @@ require_once("service-utils.inc"); /* IMSpector */ + $pf_version=substr(trim(file_get_contents("/etc/version")),0,3); + if ($pf_version == "2.1" || $pf_version == "2.2") + define('IMSPECTOR_ETC', "/usr/pbi/imspector-" . php_uname("m") . "/local/etc/imspector"); + else + define('IMSPECTOR_ETC', "/usr/local/etc/imspector"); define('IMSPECTOR_RCFILE', '/usr/local/etc/rc.d/imspector.sh'); - define('IMSPECTOR_ETC', "/usr/pbi/imspector-" . php_uname("m") . "/local/etc/imspector"); define('IMSPECTOR_CONFIG', IMSPECTOR_ETC . '/imspector.conf'); function imspector_warn ($msg) { syslog(LOG_WARNING, "imspector: {$msg}"); } @@ -542,4 +546,4 @@ function imspector_do_xmlrpc_sync($sync_to_ip, $password) { } } -?> \ No newline at end of file +?> -- cgit v1.2.3