Complete Reset

When troubleshooting squid/squidGuard there are some procedures that may be followed to ensure things are com- pletely reset.

  1. Remove the packages from System > Packages on the Installed Packages tab in the proper order: Lightsquid, SquidGuard, then Squid

2. Remove the contents of the squid directory and cache:

rm -rf /var/squid

3. Remove the Squid and related package include files

rm /usr/local/pkg/*squid*
rm -rf /usr/local/etc/squid/

4. Ensure any leftover PBI symlinks are removed:

find / -type l -lname ‘/usr/pbi/*’ -delete

5. [Optional] Remove the settings from inside config.xml using one of the following methods:

From Diagnostics > Command Prompt in the PHP Execute box

$squid_sections = array(“squid”, “squidnac”, “squidcache”, “squidauth”,
˓→“squidextauth”, “squidtraffic”, “squidupstream”, “squidusers”); foreach ($squid_sections as $sec) {
if (is_array($config[‘installedpackages’][$sec])) unset($config[‘installedpackages’][$sec]);
}
write_config(“Removed Squid”);
  • Or to remove squid, squidguard, lightsquid, and anything else with ‘squid’ in its package name from

Diagnostics > Command Prompt in the PHP Execute box:

foreach (array_keys($config[‘installedpackages’]) as $sec) { if (strpos($sec, “squid”) !== false)
unset($config[‘installedpackages’][$sec]);
}
write_config(“Removed all squid-related settings”);

Or backup config.xml, edit the settings out, then restore.

6. Navigate to System > Packages and on the Available Packages tab, reinstall the following packages in order:

  1. Squid
  2. squidGuard
  3. Lightsquid