aboutsummaryrefslogtreecommitdiffstats
path: root/packages/squidGuard.xml
diff options
context:
space:
mode:
Diffstat (limited to 'packages/squidGuard.xml')
-rw-r--r--packages/squidGuard.xml125
1 files changed, 0 insertions, 125 deletions
diff --git a/packages/squidGuard.xml b/packages/squidGuard.xml
deleted file mode 100644
index dd837e50..00000000
--- a/packages/squidGuard.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE packagegui SYSTEM "./schema/packages.dtd">
-<?xml-stylesheet type="text/xsl" href="./xsl/package.xsl"?>
-<packagegui>
- <copyright>
- <![CDATA[
-/* $Id$ */
-/* ========================================================================== */
-/*
- authng.xml
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 to whom it may belong
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
- ]]>
- </copyright>
- <description>Describe your package here</description>
- <requirements>Describe your package requirements here</requirements>
- <faq>Currently there are no FAQ items provided.</faq>
- <name>squidGuard</name>
- <version>none</version>
- <title>none</title>
- <process_kill_command>squid</process_kill_command>
- <custom_php_install_command>
- $fout = fopen("/usr/local/etc/squid/squidGuard.conf","w");
- fwrite($fout, "# This configuration was generated by the pfSense package manager.\n");
- fwrite($fout, "logdir /usr/local/squid/logs\n");
- fwrite($fout, "dbhome /var/db/squidGuard\n");
- fwrite($fout, "dest ads {\n");
- fwrite($fout, "\t domainlist\t ads/domains\n");
- fwrite($fout, "\t urllist\t ads/urls\n");
- fwrite($fout, "}\n");
- fwrite($fout, "dest aggressive {\n");
- fwrite($fout, "\t domainlist\t aggressive/domains\n");
- fwrite($fout, "\t urllist\t aggressive/urls\n");
- fwrite($fout, "}\n");
- fwrite($fout, "dest audio-video {\n");
- fwrite($fout, "\t domainlist\t audio-video/domains\n");
- fwrite($fout, "\t urllist\t audio-video/urls\n");
- fwrite($fout, "}\n");
- fwrite($fout, "dest drugs {\n");
- fwrite($fout, "\t domainlist\t drugs/domains\n");
- fwrite($fout, "\t urllist\t drugs/urls\n");
- fwrite($fout, "}\n");
- fwrite($fout, "dest gambling {\n");
- fwrite($fout, "\t domainlist\t gambling/domains\n");
- fwrite($fout, "\t urllist\t gambling/urls\n");
- fwrite($fout, "}\n");
- fwrite($fout, "dest hacking {\n");
- fwrite($fout, "\t domainlist\t hacking/domains\n");
- fwrite($fout, "\t urllist\t hacking/urls\n");
- fwrite($fout, "}\n");
- fwrite($fout, "dest mail {\n");
- fwrite($fout, "\t domainlist\t mail/domains\n");
- fwrite($fout, "}\n");
- fwrite($fout, "dest porn {\n");
- fwrite($fout, "\t domainlist\t porn/domains\n");
- fwrite($fout, "\t urllist\t porn/urls\n");
- fwrite($fout, "}\n");
- fwrite($fout, "dest proxy {\n");
- fwrite($fout, "\t domainlist\t proxy/domains\n");
- fwrite($fout, "\t urllist\t proxy/urls\n");
- fwrite($fout, "}\n");
- fwrite($fout, "dest violence {\n");
- fwrite($fout, "\t domainlist\t violence/domains\n");
- fwrite($fout, "\t urllist\t violence/urls\n");
- fwrite($fout, "}\n");
- fwrite($fout, "dest warez {\n");
- fwrite($fout, "\t domainlist\t warez/domains\n");
- fwrite($fout, "\t urllist\t warez/urls\n");
- fwrite($fout, "}\n");
- fwrite($fout, "acl {\n");
- fwrite($fout, "\t default {\n");
- fwrite($fout, "\t pass !ads !aggressive !audio-video !drugs !gambling !hacking !mail !porn !proxy !violence !warez all\n");
- fwrite($fout, "\t redirect http://bkw.lindesign.se/tmp/denied.html");
- fwrite($fout, "\t }\n");
- fwrite($fout, "}\n");
- fclose($fout);
- add_text_to_file("/usr/local/etc/squid/squid.conf", "redirect_program /usr/local/bin/squidGuard -c /usr/local/etc/squid/squidGuard.conf");
- /* $fout = fopen("/usr/local/etc/squid/squid.conf","a");
- fwrite($fout, "redirect_program /usr/local/bin/squidGuard -c /usr/local/etc/squid/squidGuard.conf\n");
- fclose($fout); */
- mwexec("/usr/bin/touch /usr/local/squid/logs/squidGuard.log");
- mwexec("/usr/sbin/chown squid /usr/local/squid/logs/squidGuard.log");
- mwexec("/usr/bin/chgrp squid /usr/local/squid/logs/squidGuard.log");
- mwexec("/bin/chmod 744 /usr/local/squid/logs/squidGuard.log");
- mwexec("/usr/sbin/chown -R squid /var/db/squidGuard");
- mwexec("/usr/bin/chgrp -R squid /var/db/squidGuard");
- mwexec("/usr/local/sbin/squid -k reconfigure");
- </custom_php_install_command>
- <custom_php_deinstall_command>
- unlink_if_exists("/var/log/squidGuard.log");
- rmdir_recursive("/var/db/squidGuard");
- remove_text_from_file("/usr/local/etc/squid/squid.conf", "redirect_program /usr/local/bin/squidGuard -c /usr/local/etc/squid/squidGuard.conf");
- mwexec("/usr/local/sbin/squid -k reconfigure");
- </custom_php_deinstall_command>
-</packagegui>