aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-13 18:55:30 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-13 18:55:30 +0000
commit7f9a624108c9c01bbba9728d882c399cc3577074 (patch)
treea51e2d62aed7bc0ee19a5b0bd6cc43d3b76f0e3e /packages
parent9b0506be0751f3d8f6ecc3f567de46349d8ab94c (diff)
downloadpfsense-packages-7f9a624108c9c01bbba9728d882c399cc3577074.tar.gz
pfsense-packages-7f9a624108c9c01bbba9728d882c399cc3577074.tar.bz2
pfsense-packages-7f9a624108c9c01bbba9728d882c399cc3577074.zip
Add BKW's squidGUARD package.
Diffstat (limited to 'packages')
-rw-r--r--packages/squidGuard.xml47
1 files changed, 47 insertions, 0 deletions
diff --git a/packages/squidGuard.xml b/packages/squidGuard.xml
new file mode 100644
index 00000000..eac3c582
--- /dev/null
+++ b/packages/squidGuard.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<packagegui>
+ <name>squidGuard</name>
+ <!-- Menu is where this packages menu will appear -->
+ <!-- configpath gets expanded out automatically and config items will be
+ stored in that location -->
+ <configpath>['installedpackages']['squidGuard']['config']</configpath>
+ <fields/>
+ <custom_php_install_command>
+ echo "&lt;pre&gt;";
+ $fout = fopen("/usr/local/etc/squid/squidGuard.conf","w");
+ fwrite($fout, "# cat squidGuard.conf\n");
+ fwrite($fout, "dbhome /var/db/squidGuard\n");
+ fwrite($fout, "logdir /usr/local/squid/logs\n");
+ fwrite($fout, "acl {"\n");
+ fwrite($fout, "\t default {\n");
+ fwrite($fout, "\t pass all\n");
+ fwrite($fout, "\t }\n");
+ fwrite($fout, "}\n");
+ fclose($fout);
+ $fout = fopen("/usr/local/etc/squid/squid.conf","w");
+ fwrite($fout, "redirect_program /usr/local/bin/squidGuard -c /usr/local/etc/squid/squidGuard.conf\n");
+ fwrite($fout, "redirect_children 4\n");
+ fclose($fout);
+ exec("/usr/bin/touch /usr/local/squid/logs/squidGuard.log");
+ exec("/usr/sbin/chown squid /usr/local/squid/logs/squidGuard.log");
+ exec("/usr/bin/chgrp squid /usr/local/squid/logs/squidGuard.log");
+ exec("/bin/chmod 744 /usr/local/squid/logs/squidGuard.log");
+ exec("/usr/sbin/chown -R squid /var/db/squidGuard");
+ exec("/usr/bin/chgrp -R squid /var/db/squidGuard");
+ exec("/bin/chmod -R 755 /var/db/squidGuard");
+ system("/usr/local/sbin/squid -k reconfigure");
+ filter_configure();
+ </custom_php_install_command>
+ <custom_php_pre_deinstall_command>
+ </custom_php_pre_deinstall_command>
+ <custom_php_deinstall_command>
+ exec("/usr/bin/sed '$d' /usr/local/etc/squid/squid.conf > /tmp/squidtmp.conf");
+ exec("/bin/cp /tmp/squidtmp.conf /usr/local/etc/squid/squid.conf");
+ exec("/usr/bin/sed '$d' /usr/local/etc/squid/squid.conf > /tmp/squidtmp.conf");
+ exec("/bin/cp /tmp/squidtmp.conf /usr/local/etc/squid/squid.conf");
+ exec("/bin/rm /tmp/squidtmp.conf");
+ exec("/bin/rm -rf /var/db/squidGuard");
+ system("/usr/local/sbin/squid -k reconfigure");
+ </custom_php_deinstall_command>
+ <process_kill_command>squidGuard</process_kill_command>
+</packagegui>