diff --git a/www/pfSense-pkg-Lightsquid/Makefile b/www/pfSense-pkg-Lightsquid/Makefile index 8c8359f4a21a..42d1eba2094e 100644 --- a/www/pfSense-pkg-Lightsquid/Makefile +++ b/www/pfSense-pkg-Lightsquid/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= pfSense-pkg-Lightsquid -PORTVERSION= 2.43 +PORTVERSION= 2.44 CATEGORIES= www MASTER_SITES= # empty DISTFILES= # empty diff --git a/www/pfSense-pkg-Lightsquid/files/usr/local/pkg/lightsquid.inc b/www/pfSense-pkg-Lightsquid/files/usr/local/pkg/lightsquid.inc index 7decc0501358..28b801cff7ce 100644 --- a/www/pfSense-pkg-Lightsquid/files/usr/local/pkg/lightsquid.inc +++ b/www/pfSense-pkg-Lightsquid/files/usr/local/pkg/lightsquid.inc @@ -41,19 +41,7 @@ if (file_exists('/usr/local/pkg/squid.inc')) { echo "No squid.inc found. You must have Squid/Squid3 package installed to use LightSquid."; } -global $pfs_version; -$pfs_version = substr(trim(file_get_contents("/etc/version")), 0, 3); -switch ($pfs_version) { - case "2.1": - define('LIGHTSQUID_BASE', '/usr/pbi/lightsquid-' . php_uname("m")); - break; - case "2.2": - define('LIGHTSQUID_BASE', '/usr/pbi/lightsquid-' . php_uname("m") . '/local'); - break; - default: - define('LIGHTSQUID_BASE', '/usr/local'); - break; -} +define('LIGHTSQUID_BASE', '/usr/local'); // configuration settings !-- CHECK THIS --! define('LS_CONFIGPATH', LIGHTSQUID_BASE . '/etc/lightsquid'); @@ -113,23 +101,6 @@ function lightsquid_install() { // create lightsquid reports directory lightsquid_create_reportdir(); - // ugly PBI hacks - if (LIGHTSQUID_BASE != '/usr/local') { - // check and fix perl paths - lightsquid_fix_perl(); - - if (!is_dir('/usr/local/etc/lightsquid') && is_dir(LS_CONFIGPATH)) { - symlink(LS_CONFIGPATH, '/usr/local/etc/lightsquid'); - } - - if (is_dir('/usr/local/www/lightsquid')) - $_gc = exec('rm -rf /usr/local/www/lightsquid'); - - if (is_dir(LS_WWWPATH)) { - symlink(LS_WWWPATH, '/usr/local/www/lightsquid'); - } - } - // template symlinks foreach (array('novopf', 'novosea') as $tpl) { if (is_dir(LS_TEMPLATEPATH . '/' . $tpl)) { @@ -143,78 +114,17 @@ function lightsquid_install() { function lightsquid_deinstall() { // remove cronjobs lightsquid_setup_cron(false); - // undo PBI hacks - lightsquid_unfix_perl(); if (is_dir("/usr/local/www/sqstat/")) { mwexec("/bin/rm -rf /usr/local/www/sqstat/"); } } -/* - * Ugly PBI hacks around perl paths; only needed for pfSense <2.3 - */ -/* Create perl links on package install */ -function lightsquid_fix_perl() { - if (LIGHTSQUID_BASE != '/usr/local') { - /* Clean up a broken perl link first if needed. */ - $perl_path = '/usr/bin/perl'; - if (file_exists($perl_path) && is_link($perl_path)) { - $target = readlink($perl_path); - if (!file_exists($target) || !is_executable($target)) { - unlink($target); - } - } - /* Find usable perl and create perl symlink to $perl_path */ - if (!file_exists($perl_path)) { - if (is_executable("/usr/local/bin/perl")) { - symlink("/usr/local/bin/perl", "{$perl_path}"); - } elseif (is_executable(LIGHTSQUID_BASE . "/bin/perl")) { - symlink(LIGHTSQUID_BASE . "/bin/perl", "{$perl_path}"); - } - } - if (!is_dir("/usr/local/lib/perl5") && is_dir(LIGHTSQUID_BASE . "/lib/perl5")) { - symlink(LIGHTSQUID_BASE . "/lib/perl5", "/usr/local/lib/perl5"); - } - } -} -/* Remove perl links on package uninstall */ -function lightsquid_unfix_perl() { - if (LIGHTSQUID_BASE != '/usr/local') { - $perl_path = '/usr/bin/perl'; - if (file_exists($perl_path) && is_link($perl_path)) { - $target = readlink($perl_path); - $ls_target = LIGHTSQUID_BASE . "/bin/perl"; - if ($target === $ls_target) { - unlink($perl_path); - } - } - $perl_libpath = "/usr/local/lib/perl5"; - if (is_dir($perl_libpath) && is_link($perl_libpath)) { - $target = readlink($perl_libpath); - $ls_target = LIGHTSQUID_BASE . "/lib/perl5"; - if ($target === $ls_target) { - unlink($perl_libpath); - } - } - } -} /* * Package configuration routines */ function lightsquid_resync() { - global $config, $pfs_version; - - // Ugly PBI hacks - if (LIGHTSQUID_BASE != '/usr/local') { - // check perl paths - if (!file_exists("/usr/bin/perl")) { - lightsquid_fix_perl(); - } - - // Fixup library path so GD can find its libraries for graphs. - mwexec("/sbin/ldconfig -m " . LIGHTSQUID_BASE . "/lib/"); - } + global $config; lightsquid_create_reportdir(); mwexec("/bin/chmod -R u+w " . LIGHTSQUID_BASE . "/etc/lightsquid"); diff --git a/www/pfSense-pkg-Lightsquid/files/usr/local/pkg/lightsquid.xml b/www/pfSense-pkg-Lightsquid/files/usr/local/pkg/lightsquid.xml index 834efd463a6d..72c6b63f9626 100644 --- a/www/pfSense-pkg-Lightsquid/files/usr/local/pkg/lightsquid.xml +++ b/www/pfSense-pkg-Lightsquid/files/usr/local/pkg/lightsquid.xml @@ -42,13 +42,12 @@ ]]> lightsquid - 2.42 + 2.44 Squid Proxy Reports: Settings Status /usr/local/pkg/lightsquid.inc Squid Proxy Reports - Proxy Server Statistic Reports
Status
/pkg_edit.php?xml=lightsquid.xml
@@ -258,10 +257,8 @@ Enable 'Access Logging' in the Squid package! It is strongly suggested to leave the 'Log Store Directory' in Squid package at default '/var/squid/logs' value.

- 2a/ ONLY if Squid is NOT set up as transparent proxy:
- - Configure Squid - General - Proxy Interface(s) to include 'loopback' interface (in addition to any other interfaces you want Squid to bind on).
- 2b/ ONLY if using Squid 2.7 package (this is not needed for Squid 3.x.):
- - Add '127.0.0.1' to Squid - Access Control - External Cache-Managers.

+ 2/ ONLY if Squid is NOT set up as transparent proxy:
+ - Configure Squid - General - Proxy Interface(s) to include 'loopback' interface (in addition to any other interfaces you want Squid to bind on).
3/ Configure 'Report Template Settings' and 'Reporting Settings and Scheduler' below and Save when finished.

4/ Use the Refresh buttons in the 'Manual Refresh' section below to create initial LightSquid reports; otherwise you will get an error diagnostic page.
- "Refresh now" will (re)parse today's entries only in Squid's current access.log.
diff --git a/www/pfSense-pkg-Lightsquid/files/usr/local/share/pfSense-pkg-Lightsquid/info.xml b/www/pfSense-pkg-Lightsquid/files/usr/local/share/pfSense-pkg-Lightsquid/info.xml index 1b8666e96e48..e4f771186ec0 100644 --- a/www/pfSense-pkg-Lightsquid/files/usr/local/share/pfSense-pkg-Lightsquid/info.xml +++ b/www/pfSense-pkg-Lightsquid/files/usr/local/share/pfSense-pkg-Lightsquid/info.xml @@ -3,24 +3,15 @@ Lightsquid + <strong>Requires Squid3 package.</strong>]]> http://lightsquid.sf.net/ Network Management - 2.43 + 2.44 dv_serg@mail.ru - www - libexec/lightsquid/ip2name.list:www/lightsquid - lightsquid-1.8_2-##ARCH##.pbi - - graphics/gd graphics/p5-GD - www/lightsquid - lightsquid_SET_FORCE=GD;libgd_UNSET_FORCE=FONTCONFIG XPM;perl_UNSET_FORCE=MULTIPLICITY RC - 2.2 - https://packages.pfsense.org/packages/config/lightsquid/lightsquid.xml + 2.3 lightsquid.xml true - Please visit Status - Squid Proxy Reports - Settings and read the configuration and usage instructions. diff --git a/www/pfSense-pkg-Lightsquid/files/usr/local/www/sqstat/sqstat.php b/www/pfSense-pkg-Lightsquid/files/usr/local/www/sqstat/sqstat.php index 5d3a0e836cb2..5d775a5080a6 100644 --- a/www/pfSense-pkg-Lightsquid/files/usr/local/www/sqstat/sqstat.php +++ b/www/pfSense-pkg-Lightsquid/files/usr/local/www/sqstat/sqstat.php @@ -108,7 +108,6 @@ function update_stop() { - - - - - + Requires Squid3 or Squid package. +realtime statistics (SQStat). Requires Squid3 package.